76253a4e745277b31d974fb1de8d352376b9d0a4
software/index.md
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | ## backups |
7 | 7 | * [borg](borg) |
8 | 8 | * [borgmatic](borgmatic) |
9 | +* [tarsnap](tarsnap) |
|
9 | 10 | |
10 | 11 | ## browsers |
11 | 12 | * [w3m](w3m) |
software/tarsnap.md
... | ... | @@ -0,0 +1,31 @@ |
1 | +# tarsnap |
|
2 | + |
|
3 | +## backup |
|
4 | +* `ratnaps` |
|
5 | +``` |
|
6 | +#!/bin/sh |
|
7 | + |
|
8 | +# Set up archive name |
|
9 | +computer=$(uname -n) |
|
10 | +now=$(date +%Y%m%d) |
|
11 | +name=${computer}-${now} |
|
12 | +#dirs="$@" |
|
13 | + |
|
14 | +# Create an archive |
|
15 | +/usr/bin/tarsnap -c \ |
|
16 | + -f "${name}" \ |
|
17 | + /etc /home /var /... |
|
18 | + #"${dirs}" |
|
19 | +``` |
|
20 | +* add to cron |
|
21 | + |
|
22 | +## list |
|
23 | +``` |
|
24 | +tarsnap --list-archives | sort |
|
25 | +``` |
|
26 | + |
|
27 | +## extract |
|
28 | +* extracts full path so genrally start from / |
|
29 | +``` |
|
30 | +tarsnap -x -f <archive_name> |
|
31 | +``` |