Backups

Read 36140 times
I got it working great now.  :)


tested it out on 1 account, and it worked pretty much perfectly... just had to make 2 changes after the restore.

Just now gotta figure out the reseller accounts... and then I'll be golden.
Last Edit: June 03, 2013, 02:34:08 pm by DJFire_CFR
CrossFire-Hosting LLC.
Co-Owner
Is there a way to do multiple users, not an entire server, but say like 5-6 users...

Would you just do it as  --username=USERNAME --username=USERNAME etc?

Or is there a specific way to do multiple users
CrossFire-Hosting LLC.
Co-Owner
Well, I got closer with this...

but when using  --novalidate=0

I get a mismatch error, as if its not even acknowledging it

Code: [Select]
/usr/local/centovacast/bin/ccmanage restore --filename=/usr/local/centovacast/var/backups/vhosts/backup-username_20130601-123518_51aa4cf6da626.zip --rpchostid=1 --username=username --novalidate=0


Results in:
Code: [Select]
[INF] Extracting backup archive ...
Result: ERROR Could not unpack backup file: Signature verification failed: Signature mismatch

How did you solve this?
Just use  --novalidate
CrossFire-Hosting LLC.
Co-Owner
Backing up and restoring to the local server (rpchostid=1) works fine but trying to restore to a different server (rpchostid=2) gives the error "Backup file does not exist". I've also tried moving the backup file to the different server and it gives the same error.

root@cc3:~# /usr/local/centovacast/bin/ccmanage backup --username=backuptest
Enter password for admin:
[INF] Creating database backup
[INF] Creating database dump /usr/local/centovacast/var/tmp/cc-app/database-backuptest_20140804-185544_53dfc9205d7a2.ccsql
[INF] Creating backup manifest
[INF] Creating backup archive
[INF]   Compressing backuptest/.backup/database-backuptest_20140804-185544_53dfc92060b88.zip (1466 bytes, file 1/33)
[INF]   Compressing backuptest/etc/source.conf (2102 bytes, file 33/33)
filename: "/usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip"
Result: OK Created backup

root@cc3:~# /usr/local/centovacast/bin/ccmanage restore --filename=/usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip --username=newbackup --rpchostid=2
Enter password for admin:
[INF] Processing backup /usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip
Result: ERROR Backup file /usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip does not exist

root@cc3:~# ls -lat /usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip
-rw-rw---- 1 ccuser centovacast 47215 Aug  4 18:55 /usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip

Has anyone else successfully managed to backup from one rpchost id and restored it to another ?
I've also tried moving the backup file to the different server and it gives the same error.
You may want to try that again, as the error in the example you quoted below is caused by the backup file not existing on rpchostid number 2 (because you haven't copied it there).


root@cc3:~# /usr/local/centovacast/bin/ccmanage backup --username=backuptest

The shell prompt here shows that you're running the backup command on a machine named "cc3", which corresponds to rpchostid number 1 ...


root@cc3:~# /usr/local/centovacast/bin/ccmanage restore --filename=/usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip --username=newbackup --rpchostid=2

... but here, you're telling Centova Cast to try to find that backup on a different server (rpchostid number 2).  But since you haven't copied it to server 2, Centova Cast cannot, of course, find it there.


root@cc3:~# ls -lat /usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip
-rw-rw---- 1 ccuser centovacast 47215 Aug  4 18:55 /usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip

All you're doing here is demonstrating that the backup file exists on server 1.  That does absolutely no good if you're trying to use the backup file on server 2.
Thanks for the prompt reply Steve.

I did have the file on the rpchostid 2 server but it was in /root/. I moved it to /usr/local/centovacast/var/backups/vhosts/ and it worked.
I did have the file on the rpchostid 2 server but it was in /root/. I moved it to /usr/local/centovacast/var/backups/vhosts/ and it worked.

It's fine to have it in /root, but if so you need to use --filename=/root/backup-backuptest_20140804-185544_53dfc9206159d.zip in the restore command.  Centova Cast will use whatever filename you give it, so if you specify --filename=/usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip then Centova Cast is going to look for /usr/local/centovacast/var/backups/vhosts/backup-backuptest_20140804-185544_53dfc9206159d.zip.
Great. Thanks for the clarification.  8)
I've been doing some more testing with the backup and restore functionality but I'm running into some issues again. I exported an account from CCv2 to the CCv3 with the following command line :

Code: [Select]
./export.sh --local=0 --oldpass=xxx --newpass=xxx --host=control.internet-radio.com --sshport=2222 --accounts=xxxusername
Works great and imports correctly into CCv3. I then backed up the account with the following :

Code: [Select]
/usr/local/centovacast/bin/ccmanage backup --username=xxxusername
I wanted to take advantage of the ability to change username during restore so I deleted the account xxxusername and tried to restore with the following command which according to the API specs should allow me to change the username from xxxusername to xxxNEWusername when it re-imports :
 
Code: [Select]
/usr/local/centovacast/bin/ccmanage restore --username=xxxNEWusername --filename=/usr/local/centovacast/var/backups/vhosts/backup-xxxusername_20140827-000918_53fd139e29450.zip -rpchostid=1 --dryrun=1
I got the following error though :

Code: [Select]
[INF] Processing backup /usr/local/centovacast/var/backups/vhosts/backup-xxxusername_20140827-000918_53fd139e29450.zip
[INF] Extracting backup archive ...
[INF] Reading manifest ...
[INF] Backup was created for user xxxusername at 2014-08-27 00:09:18
[INF] Restoring data files ...
[INF] Unpacking database ...
[INF] Importing database ...
[INF] Imported new account ID 1
Result: ERROR Unable to access imported account: Unable to access account for _xxxNEWusername: Invalid username or password

So next I thought that perhaps the problem was me changing the username while restoring but it gives the same error when I restore with the same username. I also tried it without --dryrun=1 and the same again.

Any suggestions ?
Very interesting. I thought there was no way to rename an account in Centova - we've "renamed" them by deleting old account and creating a new one...
http://www.radioboss.fm - stream hosting
http://www.djsoft.net - radio automation software
Yeah for sure. Us too. We do get requests and have previously just setup new accounts but of course you loose all the reporting history and settings. I noticed this thread and bookmarked it until I could give it more of a test but there seems to be issues with it.

Very interesting. I thought there was no way to rename an account in Centova - we've "renamed" them by deleting old account and creating a new one...
Backups do not restore, and if the user has more than about 8GIG of files the backup fails
http://prntscr.com/4u6tzi
My Auto DJ
Orlando, FL USA
Quality SHOUTcast Hosting http://myautodj.com
SHOUTcast Widgets http://shoutcastwidgets.com
The only way I found in getting around that "issue", is by just backing up the account itself using --nocontent   then taring up the music/image, etc by itself, transferring everything, restore the account first, then untar the other stuff in the restored folder, then running  permissions and indexing music.  Bit of a process, but only way "I" have done.
CrossFire-Hosting LLC.
Co-Owner
It seems that creating a backup on one server and restoring it on another doesn't work. After attempt to restore it, it just says that it can't access the new account.

By the way, is it possible this failed attempt to move an account somehow corrupted the database? Just asking, everytinhg seems to be working, just need to make sure.
http://www.radioboss.fm - stream hosting
http://www.djsoft.net - radio automation software