Repository navigation
Expand file tree
/
Copy pathremote-backup.toml
More file actions
82 lines (72 loc) · 2.46 KB
/
Copy pathremote-backup.toml
File metadata and controls
82 lines (72 loc) · 2.46 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# btrfs-backup-ng Remote Backup Configuration
#
# Backup multiple volumes to a remote NAS over SSH with compression.
#
# `compress` on an ssh:// target compresses the stream before the wire and
# decompresses it on the remote before btrfs receive -- bandwidth saved, same
# result on disk. The /data volume also shows a raw+ssh:// target, where
# compression instead applies at rest and is recorded in the .meta sidecar.
# Copy to ~/.config/btrfs-backup-ng/config.toml
[global]
incremental = true
parallel_volumes = 2
parallel_targets = 2
[global.retention]
min = "1d"
hourly = 24
daily = 7
weekly = 4
monthly = 12
# Home directory
[[volumes]]
path = "/home"
snapshot_prefix = "home-"
[[volumes.targets]]
path = "ssh://backup@nas:/backups/workstation/home"
ssh_sudo = true
compress = "zstd" # compressed over the wire, decompressed on the
# remote before btrfs receive
rate_limit = "100M"
# Root filesystem
[[volumes]]
path = "/"
snapshot_prefix = "root-"
snapshot_dir = "/.snapshots"
[volumes.retention]
daily = 7
weekly = 2
[[volumes.targets]]
path = "ssh://backup@nas:/backups/workstation/root"
ssh_sudo = true
compress = "zstd" # compressed over the wire, decompressed on the
# remote before btrfs receive
rate_limit = "100M"
# Data volume
[[volumes]]
path = "/data"
snapshot_prefix = "data-"
[[volumes.targets]]
path = "ssh://backup@nas:/backups/workstation/data"
ssh_sudo = true
compress = "lz4" # compressed over the wire, decompressed on the
# remote before btrfs receive
rate_limit = "100M"
# A second target for the same volume, showing how to get COMPRESSED remote
# backups: send to a raw target instead of a btrfs one.
#
# A raw target stores each backup as a `btrfs send` stream in a plain file
# beside a .meta sidecar, so the destination does not need to be btrfs at all --
# it can be any filesystem the remote can write to. The raw endpoint compresses
# the stream itself and records the method in that sidecar, which is what lets a
# restore reverse it. A btrfs target compresses too, but over the wire rather
# than at rest: the remote decompresses before `btrfs receive`, so what lands is
# a normal subvolume.
#
# The trade-off: a raw backup is a stream file rather than a browsable
# subvolume, so you restore it with `btrfs-backup-ng restore` instead of reading
# it in place.
[[volumes.targets]]
path = "raw+ssh://backup@nas:/backups/workstation/data-raw"
ssh_sudo = true
compress = "zstd"
rate_limit = "100M"