Last active
February 8, 2021 11:13
-
-
Save radupotop/53481ac6ba2ca1e67a2db96c2a826c8c to your computer and use it in GitHub Desktop.
Backup folders to an AWS/B2 bucket using rclone.
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
#!/usr/bin/fish | |
# | |
# Script to backup folders to an AWS/B2 bucket using rclone. | |
# | |
begin | |
set -l RCLONE /usr/bin/rclone -Pv --links --exclude ".git/" --delete-excluded sync | |
set -l BUCKET BackupBucket: | |
set -l SYNC_FOLDERS Courses Documents Foto | |
for folder in $SYNC_FOLDERS | |
echo -e \n$folder\n | |
command $RCLONE $HOME/$folder $BUCKET/$folder | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment