• Welcome to SAIL Community Supported PBX . Please login or sign up.
 

Can you restore between operating systems?

Started by drifting, March 14, 2018, 12:55:41 PM

Previous topic - Next topic

drifting

Hi

I have a customer who has an s200, but they now need to purchase the next model up. Out of curiosity and to try and prepare the swop over, I built up a debian install of Sail.
Backed up the working s200 and restored the backup to the new debian. The restore seemed to hang and do very little, no completed etc shown. However after the restore I could not log into the web interface, and all I got was "Could not exec password" I tried both the default password, and the one from the s200.

So in essence, can you restore version 5 between different hardware? I assumed yes?

Regards Paul.

sysadmin

March 16, 2018, 05:51:30 PM #1 Last Edit: March 16, 2018, 08:16:36 PM by sysadmin
The answer is yes but it's not just a question of restoring one to the other across versions or releases.   When you restore the db then you effectively regress the system to the old db release. 

Having said that, it puzzles me that it hung.   What were the two sail releases and what were the two Debian releases?

In general, after you do the restore you should run the reloader to bring, what is now an old version db up to the current levels.   To do that you run


sh /opt/sark/scripts/srkV4reloader.sh


If you let me know what you have then I may be able to advise further.

The other thing you should always do after the reload is to make sure the browser cache is cleared before you try to log back in.   You can clear it or use an incognito window for the new login

drifting

Hi

The test s200 is on :-
PBX release: 1.8.13.1
SAIL Release: 5.0.0-26
HPE Release: 5.0.0-3

And the Debian machine was just built from scratch:-
OS Debian Jessie
PBX release: 11.13.1
SAIL Release: 5.0.0-32
HPE Release: 5.0.0-1

The hang happened on a restore to the Jessie Debian. Sort of stopped? Did assume that it probably had restored, but after a restart I was not able to login. Will take your advice and try again, as I would like to be confident that I am doing everything right prior to the customers transfer


The S200 that needs to be moved over to the larger Sark hardware is on version :-
SAIL Release: 4.1.0-10
HPE Release: 4.0.0-39

Would it be prudent to upgrade this prior to the transfer? I assume it would with the matching databases? The new larger unit will be ordered soon from Provu, and wanted to be prepared for the change over.

Regards Paul.

sysadmin

March 23, 2018, 07:45:41 PM #3 Last Edit: March 23, 2018, 07:54:35 PM by sysadmin
I would not upgrade the 4.x machine.  It uses the same basic database format as 5.x.   

There was an issue in the 4.1 releases that desktop download of backups did not work correctly.   However, the backup itself on the donor machine should be good.  You can copy it with winscp or similar.   You will find the backup sets at /opt/sark/bkup on the donor box.   

When you do your upgrade, login to the bash console on the target box before you begin, and leave the session running.  In 5.x  you can choose which files you want to restore from the backup zip.  Choose only the customer database.

After the restore has finished (it doesn't take very long) you will need to run the reloader from your console session (see my previous post) to bring the old DB up to V5.

Now you MUST clear the cache of your browser or you will not be able log in.  Either clear it, or start an incognito session or start a browser from a different vendor.

You will be greeted by the V5 login screen.  Because you have come from V4, the password will not be set so the initial password will be sarkadmin, after which you will be prompted to change your password and redo the login process.

drifting

Thanks for the information.

I may have to do this in anger within the next few weeks. As soon as I have the 850 in my grubby hands will give your routine a try.

Thanks Paul

drifting

Thanks for the information, followed it to the letter and restored to a debian I had as a vm for test purposes. Worked a dream....

Question, is it supposed to restore the IP address and Name of the server? Not that it was a big deal to change.

Best wishes Paul

sysadmin

It would depend upon what you actually restored from the backup set.   If you restored everything then yes, you would get the network settings from the donor.



drifting

December 27, 2019, 01:43:07 PM #7 Last Edit: December 27, 2019, 01:49:37 PM by drifting
I know this is an old topic, but would really like to know if their are any caveats or things I should do before and upgrade to Version 6 from 5?
As I have to go from 32Bit donor to 64Bit clean install. I was hoping it was nothing more than moving a backup between machines?

Second question, what is the latest version for Sark 200's ?

Hope you had a great Xmas? And lets hope we all have a good 2020 !

Paul.

sysadmin

January 22, 2020, 09:38:11 PM #8 Last Edit: January 22, 2020, 09:39:57 PM by sysadmin
Sorry for the late reply to this.  We've been moving office in January and this got overlooked.  Upgrade from 5 to 6 is the same as upgrade from 4 to 5.   Take a backup of the 5 database, build the new box, restore the 5 database to the 6 machine and then run the reloader (see above).

However, because 6 uses a lot more jQuery than 5 you will need to clear your browser history before you attempt to login to 6 if it is on the same IP address as the 5 machine you just left.   Other than that, it should work fine.

You asked about S200.  The S200 will not get V6.   This is because we can't upgrade that platform to Debian 8/9.   There is a new 64 bit platform, called the SARK300, which will run V6 (and V7).    It currently runs Ubuntu 18 LTS, which is pretty much the equivalent of Debian 9.   The box is on beta test with a few customers at the moment and it will likely roll out in a few weeks.  The form factor is exactly the same as the S200 but it has faster cores, dual Gigabit ethernet, dual USB2 and a microSD slot.   It's a pretty cool little box.




drifting

Not a problem about the delay.
It is something I would like to test prior to upgrading in anger. I followed the procedure, and only restored the DB, did the sh /opt/sark/scripts/srkV4reloader.sh and that ran fine as far as I could see. Next ran an incognito window to the pbx, and it appeared that all the setting had come over. However, none of my phone had registered, had a quick look at the obvious, ans sure enough it had not set the passwords for the registration on the phone?
So what did I do wrong?

Regards Paul.

sysadmin

You would need to send me a screenshot of  the Asterisk entry for one of the phones.   Just go into the edit panel and take a shot of the asterisk entry.   In V6 we use a symbolic in the definition and a value in the database.   Earlier versions were hardcoded in the Asterisk definition and the password field in the DB was often empty.  Maybe this.

Here is how it should look under V6

type=peer
defaultuser=$desc
secret=$password
mailbox=404
host=dynamic
qualify=yes
context=internal
call-limit=3
callerid="$desc" <$ext>
canreinvite=no
pickupgroup=1
callgroup=1
subscribecontext=extensions
disallow=all
allow=alaw
allow=ulaw
nat=$nat
transport=$transport
encryption=$encryption


As you can see the secret stanza uses the symbolic $password.   The actual password should appear in the Password box in the left hand column.




drifting

Well there ends a tale. Which probably explains a lot.

After doing the import a second time, from a clean machine install, I get the issue where I cannot edit any of the extensions or trunks! The small edit pencil is missing?
Is this something you were aware of happening? or is it that my DB appears to be corrupt?

Paul.


sysadmin

You will need to check that you have not inadvertently set the DB to root ownership.

It should be www-data:www-data

I have seen this a few times and it is usually because a user copied an older DB while logged in as the root user