Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to synchronize a subscription between source and destination servers, which has been modified on a source server during/after Plesk migration?
Answer
To sync subscription(s) between source and destination servers, use the Re-sync feature.
-
On a destination Plesk server, go to Tools & Settings > Migration & Transfer Manager > click on an active migration session.
-
Click on the [Re-sync] button next to a subscription that needs to be synchronized.
-
Select what data needs to be re-synced for this subscription and click OK.
-
Re-sync business objects will re-sync new objects that have been added on a source server during/after migration (DNS records, missing databases without database data, database users, FTP and Plesk users, GIT repositories, SSL certificates, etc).
-
Re-sync website files will re-sync only those files that have been added/modified on a source/target server during/after migration.
To prevent the synchronization of files changed on the target server, add an option to the migrator configuration file:
[GLOBAL]
rsync-additional-args: -u -
Re-sync database data (tables, rows, etc.) will remigrate database(s) completely.
-
Re-sync mail messages will re-sync only new emails that have been sent/received/modified on a source server during/after migration. Emails/accounts that already exist on a destination server will not be removed.
-
-
On a destination Plesk server, go to Tools & Settings > Migration & Transfer Manager > click on an active migration session.
-
Switch to the List of subscriptions tab.
-
Click Switch to advanced mode.
-
Select subscriptions that need to be re-synced using check-boxes and click Re-sync.
-
Select what data needs to be re-synced for this subscription and click OK.
- Re-sync business objects will re-sync new objects that have been added on a source server during/after migration (DNS records, missing databases without database data, database users, FTP and Plesk users, GIT repositories, SSL certificates, etc).
-
Re-sync website files will re-sync only those files that have been added/modified on a source/target server during/after migration.
To prevent the synchronization of files changed on the target server, add an option to the migrator configuration file:
[GLOBAL]
rsync-additional-args: -u -
Re-sync database data (tables, rows, etc) will remigrate database(s) completely.
-
Re-sync mail messages will re-sync only new emails that have been sent/received/modified on a source server during/after migration. Emails/accounts that already exist on a destination server will not be removed.
Synchronizing all content
To sync content of all subscriptions, use the following commands:
-
Linux
# cd /usr/local/psa/var/modules/panel-migrator/sessions/<session_dir_name>/
# /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator copy-content
-
Windows
C:\> cd %plesk_dir%\var\modules\panel-migrator\sessions\<session_dir_name>
C:\> "%plesk_dir%admin/plib/modules/panel-migrator/backend/plesk-migrator.bat" generate-migration-list
C:\> "%plesk_dir%\admin\plib\modules\panel-migrator\backend\plesk-migrator.bat" copy-content
If initial migration was done via Plesk interface, it is required to modify the config.ini
file in order to synchronize content via CLI. Add the following line in both [plesk]
for target and [source]
for source server directives in %plesk_dir%\var\modules\panel-migrator\conf\config.ini
file:
CONFIG_TEXT: windows-password-type = "plain"
As a result, config.ini
will look alike:
CONFIG_TEXT: [GLOBAL]
target-type = "plesk"
session-dir = "<session_dir_name>"
skip-log-priority-check = "1"
skip-migrator-updates = "1"
skip-set-session-directory-permissions = "1"
use-separate-log = "1"
source-type = "plesk"
sources = "source"
skip-rpc-agent-deployment = "false"
adjust-applications = "true"
[plesk]
ip = "10.10.10.10"
os = "windows"
windows-username = "Administrator"
windows-password = "*******"
windows-password-type = "plain"
[source]
ip = "20.20.20.20"
os = "windows"
windows-username = "Administrator"
windows-password = "*******"
windows-password-type = "plain"
session-dir = "C:\panel_migrator"
copy-mail-content = "full"
copy-web-content = "full"
copy-db-content = "full"
[ui]
data-import-type = "selected"
timing-policy = "false"
resync-content = "true"
operability-check = "true"
Otherwise, the following error will appear:
CONFIG_TEXT: "%plesk_dir%/admin/plib/modules/panel-migrator/backend/plesk-migrator.bat" copy-content
[INFO] Initialize Plesk Migrator
[INFO] Load configuration
[ERROR] The encrypted password is specified in the configuration option 'windows-password' of section 'plesk'. Migration with encrypted passwords is not supported by CLI interface. Replace the encrypted password by plain one (also change the password type to "plain") or set up the plain password in the environment variable 'PLESK_WINDOWS_PASSWORD'.
Synchronizing content separately
Also, content can be synchronized separately. There are three types of content:
- Mail content
- Database content
- Web content
During Mail content synchronization, all mail content is copied from a source server. New mail on a destination server will not be overwritten.
During Database content synchronization, content of a user's database (MySQL/MS SQL) on a destination server is replaced by content from a source server.
During Web content synchronization, files on a destination server are replaced by files from a source server.
For a specific type of content use the following options to sync web, mail and database content accordingly:
copy-web-content
copy-mail-content
copy-db-content
Note: Such commands synchronize already migrated objects' content. If during or after a migration, a new database or a mail account is created, it will not be synchronized. Instead, use the command below:
# /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator transfer-accounts --reload-source-data
To sync Business Objects only:
# /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator transfer-accounts --reload-source-data --skip-copy-web-content --skip-copy-mail-content --skip-copy-db-content --skip-services-checks --skip-infrastructure-checks --skip-main-node-disk-space-checks --skip-license-checks --skip-capability-checks --ignore-migration-list-errors
To sync content of certain domains only, use the following instruction:
-
Prepare a migration list containing domains that should be synchronized.
The list format should be as follows:
CONFIG_TEXT: Customer: customer
example.com -
Plesk Migrator should be pointed to that migration list directly when executed. For example, to sync web content:
Linux:
# /usr/local/psa/admin/sbin/modules/panel-migrator/plesk-migrator copy-web-content --migration-list-file <path-to-the-migration-list>
Windows:
C:\> "%plesk_dir%admin/plib/modules/panel-migrator/backend/plesk-migrator.bat" copy-web-content --migration-list-file <path-to-the-migration-list>
Comments
0 comments
Please sign in to leave a comment.