Skip to content

Instantly share code, notes, and snippets.

@happypeter
Last active July 13, 2021 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save happypeter/5269944 to your computer and use it in GitHub Desktop.
Save happypeter/5269944 to your computer and use it in GitHub Desktop.
backup upyun files to local dir
#!/bin/bash
HOST='v0.ftp.upyun.com'
USER='the_worker_name/the_bucket_name'
PASS='password_of_this_worker'
LCD='~/backup/'
RCD='uploads/'
lftp -c "open $HOST;
user $USER $PASS;
lcd $LCD;
cd $RCD;
mirror --delete --dereference --verbose $1
"
# download from upyun
# ./upyun_backup.sh
# upload to upyun
# ./upyun_backup.sh --reverse
# more params
# --exclude-glob=*.php”
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment