Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# source Lmod if it's not already sourced - cron starts in clean environment
if [ -z "$LMOD_VERSION" ]; then
source /etc/profile.d/chpc.sh
fi
ml rclone
# --links needs rclone >= 1.46
rclone -v sync /home/mcuma ubox:tallboy/mcuma --exclude-from /home/mcuma/bin/scripts/exclude.txt --links >& /home/mcuma/bin/scripts/backup.log
@mcuma
mcuma / backup_to_gdrive.sh
Last active April 6, 2024 23:22
Backup Linux home directory to Google Drive
#!/bin/bash
# source Lmod if it's not already sourced - cron starts in clean environment
if [ -z "$LMOD_VERSION" ]; then
source /etc/profile.d/chpc.sh
fi
ml rclone/1.41
rclone -v sync /home/mcuma gdrive:tallboy/mcuma --exclude-from /home/mcuma/bin/scripts/exclude.txt --skip-links >& /home/mcuma/bin/scripts/backup.log
#rclone -v sync /home/mcuma gdrive:tallboy/mcuma --backup-dir /home/mcuma gdrive:tallboy/mcuma_archive --exclude-from /home/mcuma/bin/scripts/exclude.txt >& /home/mcuma/bin/scripts/backup.log