|
|
@ -18,26 +18,26 @@ function ee_mod_migrate_data() |
|
|
|
fi |
|
|
|
elif [ "$EE_REMOTE_METHOD" == "sftp" ]; then |
|
|
|
if [ "$EE_REMOTE_PASSWORD" != "" ]; then |
|
|
|
$EE_MIGRATE_CMD1="lftp -e \"mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN; quit\" -u \"$EE_REMOTE_USER,$EE_REMOTE_PASSWORD\" sftp://$EE_REMOTE_SERVER" |
|
|
|
$EE_MIGRATE_CMD2="lftp -e \"get -c $EE_REMOTE_PATH/../wp-config.php; quit\" -u \"$EE_REMOTE_USER,$EE_REMOTE_PASSWORD\" sftp://$EE_REMOTE_SERVER" |
|
|
|
EE_MIGRATE_CMD1="lftp -e \"mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN; quit\" -u \"$EE_REMOTE_USER,$EE_REMOTE_PASSWORD\" sftp://$EE_REMOTE_SERVER" |
|
|
|
EE_MIGRATE_CMD2="lftp -e \"get -c $EE_REMOTE_PATH/../wp-config.php; quit\" -u \"$EE_REMOTE_USER,$EE_REMOTE_PASSWORD\" sftp://$EE_REMOTE_SERVER" |
|
|
|
else |
|
|
|
$EE_MIGRATE_CMD1="lftp -e \"mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN; quit\" -u \"$EE_REMOTE_USER\" sftp://$EE_REMOTE_SERVER" |
|
|
|
$EE_MIGRATE_CMD2="lftp -e \"get -c $EE_REMOTE_PATH/../wp-config.php; quit\" -u \"$EE_REMOTE_USER\" ftp://$EE_REMOTE_SERVER" |
|
|
|
EE_MIGRATE_CMD1="lftp -e \"mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN; quit\" -u \"$EE_REMOTE_USER\" sftp://$EE_REMOTE_SERVER" |
|
|
|
EE_MIGRATE_CMD2="lftp -e \"get -c $EE_REMOTE_PATH/../wp-config.php; quit\" -u \"$EE_REMOTE_USER\" ftp://$EE_REMOTE_SERVER" |
|
|
|
fi |
|
|
|
elif [ "$EE_REMOTE_METHOD" == "ftp" ]; then |
|
|
|
if [ "$EE_REMOTE_PASSWORD" != "" ]; then |
|
|
|
$EE_MIGRATE_CMD1="lftp -e \"mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN; quit\" -u \"$EE_REMOTE_USER,$EE_REMOTE_PASSWORD\" ftp://$EE_REMOTE_SERVER" |
|
|
|
$EE_MIGRATE_CMD2="lftp -e \"get -c $EE_REMOTE_PATH/../wp-config.php; quit\" -u \"$EE_REMOTE_USER,$EE_REMOTE_PASSWORD\" ftp://$EE_REMOTE_SERVER" |
|
|
|
EE_MIGRATE_CMD1="lftp -e \"mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN; quit\" -u \"$EE_REMOTE_USER,$EE_REMOTE_PASSWORD\" ftp://$EE_REMOTE_SERVER" |
|
|
|
EE_MIGRATE_CMD2="lftp -e \"get -c $EE_REMOTE_PATH/../wp-config.php; quit\" -u \"$EE_REMOTE_USER,$EE_REMOTE_PASSWORD\" ftp://$EE_REMOTE_SERVER" |
|
|
|
else |
|
|
|
$EE_MIGRATE_CMD1="lftp -e \"mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN; quit\" -u \"$EE_REMOTE_USER\" ftp://$EE_REMOTE_SERVER" |
|
|
|
$EE_MIGRATE_CMD2="lftp -e \"get -c $EE_REMOTE_PATH/../wp-config.php; quit\" -u \"$EE_REMOTE_USER\" ftp://$EE_REMOTE_SERVER" |
|
|
|
EE_MIGRATE_CMD1="lftp -e \"mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN; quit\" -u \"$EE_REMOTE_USER\" ftp://$EE_REMOTE_SERVER" |
|
|
|
EE_MIGRATE_CMD2="lftp -e \"get -c $EE_REMOTE_PATH/../wp-config.php; quit\" -u \"$EE_REMOTE_USER\" ftp://$EE_REMOTE_SERVER" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
$EE_MIGRATE_CMD1 \ |
|
|
|
eval $EE_MIGRATE_CMD1 \ |
|
|
|
|| ee_lib_error "Unable to migrate data using rsync, exit status = " $? |
|
|
|
if [ ! -f /ee-backup/$EE_DOMAIN/wp-config.php ] && [ "$EE_SITE_CREATE_OPTION" != "--html" ] && [ "$EE_SITE_CREATE_OPTION" != "--php" ] && [ "$EE_SITE_CREATE_OPTION" != "--mysql" ]; then |
|
|
|
$EE_MIGRATE_CMD2 \ |
|
|
|
eval $EE_MIGRATE_CMD2 \ |
|
|
|
|| ee_lib_error "Unable to migrate data using rsync, exit status = " $? |
|
|
|
fi |
|
|
|
|
|
|
|