Add backup script

master
Hektor Misplon 2022-05-16 11:22:12 +02:00
parent 33fc3047fd
commit 97304834bc
2 changed files with 35 additions and 0 deletions

16
.bin/backup-home Executable file
View File

@ -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:<repo>:<directory>
#
# 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"

19
.resticexclude Normal file
View File

@ -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