Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 storage #140

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/restic_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ assert_envvars \

warn_on_missing_envvars \
B2_ACCOUNT_ID B2_ACCOUNT_KEY B2_CONNECTIONS \
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY \
RESTIC_PASSWORD_FILE

# Convert to arrays, as arrays should be used to build command lines. See https://github.com/koalaman/shellcheck/wiki/SC2086
Expand Down
3 changes: 2 additions & 1 deletion bin/restic_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ assert_envvars\
RESTIC_PASSWORD_FILE RESTIC_REPOSITORY RESTIC_VERBOSITY_LEVEL

warn_on_missing_envvars \
B2_ACCOUNT_ID B2_ACCOUNT_KEY B2_CONNECTIONS
B2_ACCOUNT_ID B2_ACCOUNT_KEY B2_CONNECTIONS \
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY

B2_ARG=
[ -z "${B2_CONNECTIONS+x}" ] || B2_ARG=(--option b2.connections="$B2_CONNECTIONS")
Expand Down
5 changes: 5 additions & 0 deletions etc/restic/_global.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ export RESTIC_BACKUP_EXCLUDE_FILE="{{ INSTALL_PREFIX }}/etc/restic/backup_exclud
export B2_ACCOUNT_ID="<b2-key-id>" # *EDIT* fill with your keyID
export B2_ACCOUNT_KEY="<b2-application-key>" # *EDIT* fill with your applicationKey

# Official instructions on how to setup the restic variables for S3-compatible Storage can be found at
# https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#s3-compatible-storage
export AWS_ACCESS_KEY_ID="<s3-access-key-id>" # *EDIT* fill with your keyID
export AWS_SECRET_ACCESS_KEY="<s3-secret-access-key>" # *EDIT* fill with your applicationKey

# How many network connections to set up to B2. Default is 5.
export B2_CONNECTIONS=10

Expand Down
2 changes: 1 addition & 1 deletion usr/lib/systemd/system/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Unit]
Description=Backup with restic to Backblaze B2
Description=Backup with restic
# Email on failure require special setup. See README.md
#OnFailure=status-email-user@%n.service
# Prevent backup on unmetered connection. Needs special setup. See README.md.
Expand Down
2 changes: 1 addition & 1 deletion usr/lib/systemd/system/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Unit]
Description=Check restic backup Backblaze B2 for errors
Description=Check restic backup for errors
# Email on failure require special setup. See README.md
#OnFailure=status-email-user@%n.service
Conflicts=restic-backup.service
Expand Down
2 changes: 1 addition & 1 deletion usr/lib/systemd/system/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Unit]
Description=Check restic backup Backblaze B2 for errors on a schedule
Description=Check restic backup for errors on a schedule

[Timer]
OnCalendar=monthly
Expand Down
Loading