-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
111 lines (84 loc) · 3.09 KB
/
README
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
**automate borg backups using a yaml config file
example usage:
./borgrunner.py borg.yaml info
./borgrunner.py borg.yaml backup
./borgrunner.py borg.yaml info backup prune info
using keys on remote repo:
./borgrunner.py {yaml file} [commands...] options
commands:
backup
prune
info
list
not implimented yet:
check fullcheck, mount, umount, break-lock
options:
-h, --help show help message
-P PASSWORD, --password PASSWORD passphrase for repo keyfile, can override borgPass
-i path to ssh key for remote repository, can override sshKey
-v, --verbose verbose mode
-l LOGPATH, --logpath LOGPATH log path
example:
./borgrunner.py borg.yaml info list
./borgrunner.py borg.yaml info backup info
./borgrunner.py borg.yaml list -P password -i /home/uid/.ssh/borg-key
where
-i -> path to private key
-P -> passphase to key
sample yaml using ssh
=================================================
---
repos:
url: uid@borg:repo
borgPass: 'optional pass'
borgPass64: 'optional encoded pass' use borgPass xor borgPass64. if both used, encoded will take precidence
sshKey: 'optional path'
dryrun: false
archive:
# documnents
# --------------------------
- prefixName: "documents-"
postfixName: "{now:%Y-%m-%dT%H:%M:%S}"
backup:
flags: [ -s, --list, --filter, AME,--one-file-system ]
includes: [ '/home/uid/documents/' ]
exclude-files: [ "/home/uid/scripts/exclude" ]
info:
flags [ --sort-by name ]
list:
flags: [ --sort-by name ]
prune:
usePrefix: true
flags: [ "--stats", "--list", "--save-space" ]
keep: { "keep-daily" : 14,
"keep-weekly" : 8,
"keep-monthly": 6,
"keep-yearly" : 2
}
# development
# --------------------------
- prefixName: "dev-"
postfixName: "{now:%Y-%m-%dT%H:%M:%S}"
backup:
flags: [ -s, --list, --filter, AME,--one-file-system ]
includes: [ '/home/uid/dev/' ]
excludes: [ '/home/uid/dev/projA', '/home/uid/dev/projB' ]
exclude-files: [ '/home/uid/scripts/dev-exclude', '/home/uid/scripts/exclude' ]
info:
flags [ --sort-by name ]
list:
flags: [ --sort-by name ]
prune:
usePrefix: true
flags: [ "--stats", "--list", "--save-space" ]
keep: { "keep-daily" : 7,
"keep-weekly" : 8,
"keep-monthly": 12,
"keep-yearly" : 2
}
...
=================================================
running using keyfile encryption and ssh private key with no passphrase
./borgrunner.py borg.yaml info backup prune info -P 1234 -i /home/uid/.ssh/key
if sshkey file path is in yaml and passphrase is encoded in yaml:
./borgrunner.py borg.yaml info backup prune info