Junk

Junk Commit Details

Date:2019-04-30 17:42:09 (6 months 18 days ago)
Author:Nicola Fontana
Branch:master
Commit:e782d65b86ad02a2d755231a49ceaf004bc0451c
Parents: 3d7a5af8ee06e80497aae1f916de9eaed8de1319
Message:borgshot: first implementation

Changes:
Amisc/borgshot (full)

File differences

misc/borgshot
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
#!/bin/sh
die() {
echo "$1." >&2
echo "Usage: $0 NAME FOLDER [ ... ]" >&2
exit 1
}
info() {
echo "$1"
}
test -n "$1" || die "Backup name required"
test -n "$2" || die "At least one folder is required"
name=$1
shift
folders="$@"
for d in $folders
do
test -d "$d" || die "Folder '$d' not found"
done
# On interactive shells, add additional information
tty -s && info='--progress --stats' || info=
info "Storing new snapshot"
borg create $info \
-e '/tmp/' \
-e '/var/tmp/' \
-e '/home/*/.vim/tmp/' \
-e '/home/*/docs/download/' \
-e '/home/*/.local/share/Trash/' \
-e '/home/*/.cache' \
::$name-{now:%Y%m%d} \
$folders
info "Pruning old backups"
borg prune $info \
-d 7 -w 4 -m 6 \
--prefix $name-

Archive Download the corresponding diff file

Branches