dots/.bin/save-home

26 lines
700 B
Plaintext
Raw Permalink Normal View History

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`
#
# ```/etc/restic-env
# export B2_ACCOUNT_ID=
# export B2_ACCOUNT_KEY=
# ```
#
# `restic -r b2:desktop-arch init`
2023-05-15 14:06:39 +02:00
source /etc/restic-env
2023-07-12 20:52:51 +02:00
restic -r "$RESTIC_REPOSITORY:$HOSTNAME" backup \
--tag "hektor" \
2023-05-15 14:06:39 +02:00
--one-file-system \
--files-from="$HOME/.resticinclude" \
--exclude-file="$HOME/.resticexclude" \
--verbose=3