w.get_or_create_repo
cd /data/codeguard/shared/data/repos/website-xxxx
git checkout xxxx
lftp -e "set ftp:ssl-allow no; mirror --parallel=4 --use-pget-n=2 --verbose -R local/directory/to/restore /remote/directory/to/restore/to" -u user,'pass' -p port hostname
For sites with a key:
lftp -e "set sftp:connect-program 'ssh -a -x -i /data/key'; mirror --parallel=4 --use-pget-n=2 --verbose -R local/directory/to/restore /remote/directory/to/restore/to" -u user,placeholder sftp://hostname
If you see errors about the number of connections, decrease the –use-pget-n and –parallel values.