diff --git a/.bin/backup-home b/.bin/backup-home new file mode 100755 index 0000000..3e96589 --- /dev/null +++ b/.bin/backup-home @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Back up my $HOME folder to OneDrive using `restic`. +# +# Adds extra flags needed for using `rclone` with sharepoint WebDav I.e. add +# `--ignore-size --ignore-checksum --update` to the default `rclone.args`. +# +# Select directory in repo using -r rclone:: +# +# Runs `backup` command on $HOME and ignore what is listed in `.resticexclude` + +restic \ + -o rclone.args="serve restic --stdio --b2-hard-delete --ignore-size --ignore-checksum --update" \ + -r rclone:onedrive-vub:restic \ + -v backup "$HOME" \ + --exclude-file="$HOME/.resticexclude" diff --git a/.resticexclude b/.resticexclude new file mode 100644 index 0000000..aa7c53e --- /dev/null +++ b/.resticexclude @@ -0,0 +1,19 @@ +# Restic ignore + +# General +.cache +cache +build +.git +node_modules + +# Specifics +$HOME/.atom +$HOME/.cargo +$HOME/.espressif +$HOME/.local/share/torbrowser +$HOME/.mozilla +$HOME/.nvm +$HOME/.npm +$HOME/.nuget +$HOME/doc/disk-images