Last change
on this file since 17951 was
15928,
checked in by uli, 5 years ago
|
Install scripts to set borg env vars.
When installing borg, provide scripts for all repositories to set local env
vars, namly repository URLs and the borg passphrase. These are normally
cumbersome to in shell commands.
|
File size:
637 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # |
---|
3 | # Set env vars for easier execution of borg commands |
---|
4 | # |
---|
5 | # This script was generated from a template by ansible. |
---|
6 | # |
---|
7 | # Run it like this: |
---|
8 | # |
---|
9 | # # . env-{{ item.fqdn }} |
---|
10 | # |
---|
11 | # Afterwards you can do something like |
---|
12 | # |
---|
13 | # # borg list $REPO |
---|
14 | # # borg check $REPO |
---|
15 | # # borg list $REPO::2020-01-15_01:15 |
---|
16 | # |
---|
17 | # |
---|
18 | |
---|
19 | # Sourcing the backup-passphrase |
---|
20 | . /root/backup/.borg_passphrase |
---|
21 | export REPO=ssh://{{ item.user }}@{{ item.fqdn }}:{{ item.port }}/./{{ item.home }}{{ item.pool }}/{{ inventory_hostname_short }} |
---|
22 | |
---|
23 | echo "Set \$BORG_PASSPHRASE and \$REPO" |
---|
24 | echo |
---|
25 | echo "Now you can do something like" |
---|
26 | echo "# borg list \$REPO" |
---|
27 | echo "# borg check \$REPO" |
---|
Note: See
TracBrowser for help on using the repository browser.