Last active
July 13, 2021 06:57
-
-
Save happypeter/5269944 to your computer and use it in GitHub Desktop.
backup upyun files to local dir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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