blob: 55398d1a90c95a6261afa2e044ac563c6442ffc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Borger
A script for home folder backups using [Borg](https://borgbackup.readthedocs.io).
# Features
* Multiple destinations using config files.
* Automatically initializes repository in the remote destination.
* Automatically pruning of old backups.
# Usage
Create a config for your `servername` destination at `~/.config/borger/servername`:
# Backup destination
export SSH_SERVER="user@host"
export SSH_PORT="2202"
# Repository path
export BORG_REPO_DIR="/var/backups/users/$USER/borg"
export BORG_REPO="ssh://$SSH_SERVER:$SSH_PORT/$BORG_REPO_DIR"
# Setting one of those, so you won't be asked for your repository passphrase:
#export BORG_PASSPHRASE='HACKME'
#export BORG_PASSCOMMAND='pass show backup'
#export BORG_PASSCOMMAND='keyringer default decrypt borg 2> /dev/null'
# Backup config
keepdaily="7"
keepweekly="4"
keepmonth="6"
encryption="keyfile"
placeholder="{user}"
Then run borger:
borger servername
# Checking your backups
As simply as
borger servername --check
# WARNING
Borger uses `keyfile` encrytion by default. That means **you should backup your keyfile**
somewhere else. **If you don't want that, use `encryption="repokey"` at your config.**
See [Repository Encryption](https://borgbackup.readthedocs.io/en/stable/quickstart.html#repository-encryption)
for details.
|