2022-05-16 11:22:12 +02:00
|
|
|
#!/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`
|
|
|
|
|
2023-05-15 14:06:39 +02:00
|
|
|
# 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"
|
|
|
|
|
|
|
|
source /etc/restic-env
|
|
|
|
restic -r b2:"$HOSTNAME" backup \
|
|
|
|
--one-file-system \
|
|
|
|
--files-from="$HOME/.resticinclude" \
|
|
|
|
--exclude-file="$HOME/.resticexclude" \
|
|
|
|
--verbose=3
|