wp plugin install all-in-one-wp-migration --activate
You must reload the page once before continuing
Adjust the settings for your own need, this here makes a backup of the database only. I suggest using rsync to sync media files.
wp ai1wm backup --exclude-media --exclude-themes --exclude-inactive-themes --exclude-muplugins --exclude-plugins --exclude-inactive-plugins --exclude-cache
wp plugin deactivate all-in-one-wp-migration --uninstall
cd wp-content/ai1wm-backups/
wget http://siteurl.fi/wp-content/ai1wm-backups/backup-20180105-142530-313.wpress
wp plugin install all-in-one-wp-migration --activate
You must reload the page once before continuing
wp ai1wm restore backup-20180105-142530-313.wpress
Not sure if necessary to flush permalinks twice, like when restoring from front end, but do it once or twice if you encounter problems.
wp rewrite flush
wp plugin deactivate all-in-one-wp-migration --uninstall
rm backup-20180105-142530-313.wpress
Remember to remove the unneeded backup files from the source as well