Current time: 11-01-2024, 09:27 AM Hello There, Guest! (LoginRegister)


Post Reply 
[HOWTO] Backup and Restore complete Domain
Author Message
tomdooley Offline
Development Team
*****
Dev Team

Posts: 332
Joined: Sep 2007
Reputation: 7
Post: #1
[HOWTO] Backup and Restore complete Domain
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?
(This post was last modified: 06-17-2010 07:45 PM by BeNe.)
02-21-2010 10:06 PM
Visit this user's website Find all posts by this user Quote this message in a reply
theprincy Offline
Member
***

Posts: 311
Joined: Nov 2008
Reputation: 2
Post: #2
RE: [HOWTO] Backup and Restore complete Domain
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
02-22-2010 05:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
tomdooley Offline
Development Team
*****
Dev Team

Posts: 332
Joined: Sep 2007
Reputation: 7
Post: #3
RE: [HOWTO] Backup and Restore complete Domain
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.
(This post was last modified: 02-23-2010 02:50 AM by tomdooley.)
02-23-2010 02:48 AM
Visit this user's website Find all posts by this user Quote this message in a reply
theprincy Offline
Member
***

Posts: 311
Joined: Nov 2008
Reputation: 2
Post: #4
RE: [HOWTO] Backup and Restore complete Domain
in the mysql i have delete every id or user for domain assolavori.it .
the version of ispcp is last version trunck.
02-23-2010 04:39 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tomdooley Offline
Development Team
*****
Dev Team

Posts: 332
Joined: Sep 2007
Reputation: 7
Post: #5
RE: [HOWTO] Backup and Restore complete Domain
Did you find the failed query with the mysql log?
02-24-2010 06:19 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tomdooley Offline
Development Team
*****
Dev Team

Posts: 332
Joined: Sep 2007
Reputation: 7
Post: #6
RE: [HOWTO] Backup and Restore complete Domain
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
02-26-2010 04:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
philiboy Offline


Posts: 1
Joined: Mar 2010
Reputation: 0
Post: #7
RE: [HOWTO] Backup and Restore complete Domain
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?
03-20-2010 07:31 PM
Find all posts by this user Quote this message in a reply
mekson Offline
Newbie
*

Posts: 6
Joined: Apr 2009
Reputation: 0
Post: #8
RE: [HOWTO] Backup and Restore complete Domain
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
03-21-2010 05:27 AM
Find all posts by this user Quote this message in a reply
tomdooley Offline
Development Team
*****
Dev Team

Posts: 332
Joined: Sep 2007
Reputation: 7
Post: #9
RE: [HOWTO] Backup and Restore complete Domain
(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 :-)
(This post was last modified: 03-21-2010 11:20 PM by tomdooley.)
03-21-2010 11:19 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ctct Offline
Newbie
*

Posts: 9
Joined: May 2009
Reputation: 0
Post: #10
RE: [HOWTO] Backup and Restore complete Domain
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?
04-21-2010 08:22 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)