ispCP - Board - Support
[HOWTO] Backup and Restore complete Domain - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Howtos (/forum-41.html)
+--- Thread: [HOWTO] Backup and Restore complete Domain (/thread-9699.html)

Pages: 1 2 3 4 5 6 7 8


[HOWTO] Backup and Restore complete Domain - tomdooley - 02-21-2010 10:06 PM

Hello!

I want to introduce a new migration tool for ispCP, escpecially for moving a domain from one machine to another. The usage is very simple.

What you need:
* A working ispCP release (I've currently only tested with 1.0.3) on both machines
* At least one reseller on the target machine
* GNU privacy guard signature verification tool (aptitude install gpgv)

Source machine:

Code:
cd /var/www/ispcp
svn export http://www.isp-control.net:800/ispcp_svn/branches/backup-restore
cd backup-restore
php backup.php DOMAIN PASSWORD

Then copy the file DOMAIN.tar.gz.gpg under /var/www/ispcp/backup-restore/archive to the target server.

Restore at target server:

Code:
cd /var/www/ispcp
svn export http://www.isp-control.net:800/ispcp_svn/branches/backup-restore
cd backup-restore
php restore.php DOMAIN PASSWORD

You can get the command line help via "php restore.php" or "php backup.php"

Currently the following parts of a domain can be migrated:

* Domain data, Administration login
* FTP users
* E-Mail
* Databases, users and of course the database contents itself
* Complete /var/www/virtual/DOMAIN path

Restore of DNS settings is currently not integrated. You can set a specific IP or reseller name (login) in the restore process. If you get any errors, please don't create a ticket, because it's currently not officially part of ispCP. Use the forum to give feedback :-)

@aseques: Perhaps we can use your work to complete the new tool? Perhaps for a "one-click" Plesk migration and other panels?


RE: [HOWTO] Backup and Restore complete Domain - theprincy - 02-22-2010 05:37 PM

hello, I have taken every step to restore data on the new server, only that I had not realized that you had already created user, then I deleted user and domain through the panel, and I reiseguito script but I get as error


php restore.php -v 3 assolavori.it PASSWORD
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: WARNING: message was not integrity protected
gpg --passphrase PASSWORD /var/www/ispcp/backup-restore/archive/assolavori.it.tar.gz.gpg
tar xzf /var/www/ispcp/backup-restore/archive/assolavori.it.tar.gz -C /var/www/virtual
getConfigData
configurationData OK
createDomain
Can not insert admin database entry!
Error executing restore

user is created in file /etc/passwd e /etc/shadow but not database


RE: [HOWTO] Backup and Restore complete Domain - tomdooley - 02-23-2010 02:48 AM

What version of ispCP do you use on the target machine? It should be the latest official release (1.0.3-1).

Are you sure, everything was deleted sucessfully after removing the user by ispCP panel? Please check database table "admin" after deletion. The entry for the new domain user must not be in this table.

Otherwise please activate MySQL logging to detect a wrong query.


RE: [HOWTO] Backup and Restore complete Domain - theprincy - 02-23-2010 04:39 AM

in the mysql i have delete every id or user for domain assolavori.it .
the version of ispcp is last version trunck.


RE: [HOWTO] Backup and Restore complete Domain - tomdooley - 02-24-2010 06:19 AM

Did you find the failed query with the mysql log?


RE: [HOWTO] Backup and Restore complete Domain - tomdooley - 02-26-2010 04:37 AM

Just committed a new release of the backup-restore scripts.

Fixed one error in backup process regarding htaccess. Also implemented some compability issues if backuped domain was from ispCP < 1.0.3


RE: [HOWTO] Backup and Restore complete Domain - philiboy - 03-20-2010 07:31 PM

hello tomdooley... I tried what you said above, but I did not not succeed to move my domain.
Ca you offer me more details? or a link with more documentation?


RE: [HOWTO] Backup and Restore complete Domain - mekson - 03-21-2010 05:27 AM

Hello i tried to backup on 1.0.3-1 ispcp and is going all ok, then i wont to restore on test machine 1.0.4 and have small problem with archive folder and another thing status of domain are in error state, so i repair in database status to ok and now worked ok...

So keep going on this is promising
thx


RE: [HOWTO] Backup and Restore complete Domain - tomdooley - 03-21-2010 11:19 PM

(03-21-2010 05:27 AM)mekson Wrote:  Hello i tried to backup on 1.0.3-1 ispcp and is going all ok, then i wont to restore on test machine 1.0.4 and have small problem with archive folder and another thing status of domain are in error state, so i repair in database status to ok and now worked ok...

So keep going on this is promising
thx

Yes, currently there are some problems restoring on 1.0.4. I will talk with nuxwin about solving this problem. Thanks for your response!

Of course I will also create a Wiki page for detailed documentation, after we have fixed the major errors :-)


RE: [HOWTO] Backup and Restore complete Domain - ctct - 04-21-2010 08:22 PM

I've had a problem restoring 1.0.3 files on a new 1.0.5 installation.
I had to manually chown the fcgi config files to get php working again.
Could this not be done by the script also?