How to sync linux boxes over limited sftp (no shell access)
Without shell access you can't use rsync and that is sad.
sftp and scp overwrite existing files and redownloads everything on each start so you can't continue download on lost connection. Lftp can do this for you:
--loop : to start over and over again until no changes found;
-n : to download only "new" files (you may not need it. But I have already downloaded some files with scp).
If you want to use compression set this in ~/.lftprc:
sftp and scp overwrite existing files and redownloads everything on each start so you can't continue download on lost connection. Lftp can do this for you:
REMOTE="user@somehost"
RDIR="/some/path/"
LDIR="/some/path/"
lftp -e "mirror --parallel=4 --loop -n ${RDIR} ${LDIR}" sftp://${REMOTE}
--parallel=4 : to let lftp download 4 files in parallel;--loop : to start over and over again until no changes found;
-n : to download only "new" files (you may not need it. But I have already downloaded some files with scp).
If you want to use compression set this in ~/.lftprc:
set sftp:connect-program "ssh -a -x -C"