Browse Source

Improved SFTP/FTP data transfer

next
gau1991 10 years ago
parent
commit
9a4b2b3690
  1. 8
      src/modules/site/migrate/ee_mod_migrate_data.sh

8
src/modules/site/migrate/ee_mod_migrate_data.sh

@ -11,15 +11,15 @@ function ee_mod_migrate_data()
fi
elif [ "$EE_REMOTE_METHOD" == "ftp" ]; then
lftp -e "mirror -c $EE_REMOTE_PATH" ftp://$EE_REMOTE_USER@$EE_REMOTE_SERVER
lftp -e "mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN; quit" ftp://$EE_REMOTE_USER@$EE_REMOTE_SERVER
if [ ! -f /ee-backup/$EE_DOMAIN/wp-config.php ]; then
lftp -e "get $EE_REMOTE_PATH/../wp-config.php" ftp://$EE_REMOTE_USER@$EE_REMOTE_SERVER
lftp -e "get -c $EE_REMOTE_PATH/../wp-config.php; quit" ftp://$EE_REMOTE_USER@$EE_REMOTE_SERVER
fi
elif [ "$EE_REMOTE_METHOD" == "sftp" ]; then
lftp -e "mirror -c $EE_REMOTE_PATH" sftp://$EE_REMOTE_USER@$EE_REMOTE_SERVER
lftp -e "mirror --verbose -c $EE_REMOTE_PATH /ee-backup/$EE_DOMAIN" sftp://$EE_REMOTE_USER@$EE_REMOTE_SERVER
if [ ! -f /ee-backup/$EE_DOMAIN/wp-config.php ]; then
lftp -e "get $EE_REMOTE_PATH/../wp-config.php" ftp://$EE_REMOTE_USER@$EE_REMOTE_SERVER
lftp -e "get -c $EE_REMOTE_PATH/../wp-config.php; quit" sftp://$EE_REMOTE_USER@$EE_REMOTE_SERVER
fi
fi
}

Loading…
Cancel
Save