Plesk Migration Script

Create the follwing script on the Secondary / Slave Plesk Server
nano /home/migration.sh
rm /usr/local/psa/var/modules/panel-migrator/sessions/migration-session/plesk.backup.pfu.shallow.xml
/usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator generate-migration-list --overwrite
sed -i '1,20s/^ #/ /' /usr/local/psa/var/modules/panel-migrator/sessions/migration-session/migration-list
/usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator check --ignore-pre-migration-errors
/usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator transfer-accounts --ignore-pre-migration-errors
chmod 777 /home/migration.sh
nano /usr/local/psa/var/modules/panel-migrator/conf/config.ini
[GLOBAL]
source-type: plesk
sources: pfu
[GLOBAL]
db-servers: mysql-db, mssql-db
[plesk]
ip: (slave plesk ip)
os: unix
[pfu]
ip: (master plesk ip)
os: unix
ssh-password: (master plesk ssh password)
Create a cronjob (Runs every hour)
crontab -e
0 * * * * sh /home/migration.sh
Last modified 1yr ago