/go/serversync migrates everything on this server to another GoAdmio server. It connects to the destination as root over SSH, then: It is a one-time copy of a running server, not a backup. For backups, use snapshot or backup. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
/go/serversync 203.0.113.10 'RemoteRootPassword'
Arguments
| Argument | Required | Default | Notes |
|---|---|---|---|
<remote-server> |
Yes | — | IP address or hostname of the destination. |
<root-password> |
Yes | — | The destination’s root password. Avoid spaces and shell special characters; some of the helper commands receive it without quotes. |
[port] |
No | 22 |
The destination’s SSH port. |
The command has no --option flags.
Examples
# Migrate to a server on the default SSH port
/go/serversync 203.0.113.10 'RemoteRootPassword'
# Migrate to a server with SSH on port 2222
/go/serversync 203.0.113.10 'RemoteRootPassword' 2222
# Watch the logs from another terminal
tail -f /var/log/go/serversync/mysql.log
ls /usr/local/goadmio/tmp/serversync
# On the destination, check that the background tasks have finished
screen -ls
Output
| Outcome | What you get |
|---|---|
| No arguments | Missing Remote Server and exit code 1. |
| Another run in progress | Instance (<name>) already running. and exit code 1. |
| Connection or login failed | REMOTE: Invalid username or password and exit code 1. |
| Copy started | Working... Please be patient, then one . per account as it is created on the destination. |
| Copy in progress | The terminal is cleared every 10 seconds and shows a list of finished tasks (✓ <task>) and a 50-character bar with a percentage. |
| Finished | The output of checkid run on the destination, then a blank line. |
The command exits with code 0 after the progress screen ends, even if some of the copying failed.
Logging
| Log | Content |
|---|---|
/var/log/go/serversync.log |
One line per run: the time, the remote server, ******** in place of the password, and the port. |
/var/log/go/serversync/mysql.log |
Output of mysqlsync. |
/var/log/go/serversync/postgre.log |
Output of postgresync. |
/var/log/go/serversync/ssl.log |
Output of sslsync. |
/var/log/go/serversync/<domain>.log |
Output of homesync for that account. |
Locking
The lock file /usr/local/goadmio/lock/serversync.lock blocks a second run. A lock older than one hour is treated as stale and replaced, even if the first run is still going.
Security
[!WARNING]
The destination’s root password is passed on the command line to many commands, so it is visible in the process list on this server while the sync runs. SSH host keys are not verified, and each account’s saved password is sent over SSH in a command line. Use only on a network you trust, and change the destination’s root password afterwards.
See the full reference at /go/serversync and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
