Skip to content

Instantly share code, notes, and snippets.

@radupotop
Last active February 8, 2021 11:13
Show Gist options
  • Save radupotop/53481ac6ba2ca1e67a2db96c2a826c8c to your computer and use it in GitHub Desktop.
Save radupotop/53481ac6ba2ca1e67a2db96c2a826c8c to your computer and use it in GitHub Desktop.
Backup folders to an AWS/B2 bucket using rclone.
#!/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