]> git.somenet.org - root/pub/somesible.git/blob - roles/base/backup/files/default/backup.conf.managed
[roles/workstation/google-chrome] install google chrome
[root/pub/somesible.git] / roles / base / backup / files / default / backup.conf.managed
1 #
2 ################################################
3 ### Managed by someone's ansible provisioner ###
4 ################################################
5 # Part of: https://git.somenet.org/root/pub/somesible.git
6 # 2017-2026 by someone <someone@somenet.org>
7 #
8 # Mind the pruning logic.
9 ## We keep 3 years of backups.
10 #
11
12 #
13 # replace "PASSPHRASE_CHANGEME" with something useful, or delete/empty it for no encryption.
14 #
15
16
17 # ldap backup
18 #for dbnum in `seq 1 1 1` ; do
19 #    backup_cmd2 "ssh://backup/LDAP/db-$dbnum"             "$(hostname -f)--LDAP-$dbnum" "slapcat -n $dbnum" "-d7 -w7 -m35"
20 #done
21
22
23 # postgresql backup (remote + borgbackup2)
24 #backup_cmd2 "ssh://backup/PG/_GLOBAL_" "$(hostname -f)--PG" "sudo -u postgres -- pg_dumpall --globals-only" "-d7 -w7 -m35" "PASSPHRASE_CHANGEME"
25 #for dbname in `echo "SELECT datname FROM pg_database WHERE datname not in ('template0', 'template1', 'postgres') AND datname not ilike '%_NOBKP' ORDER BY datname" | sudo -u postgres psql -A -P tuples_only=true` ; do
26 #    backup_cmd2 "ssh://backup/PG/$dbname" "$(hostname -f)--PG-$dbname" "sudo -u postgres -- pg_dump --clean --if-exists --create $dbname" "-d7 -w7 -m35" "PASSPHRASE_CHANGEME"
27 #done
28
29
30 # mysql backup (local + borgbackup 1)
31 #for dbname in `echo "select distinct TABLE_SCHEMA from information_schema.tables where TABLE_SCHEMA not in ('information_schema', 'performance_schema', 'sys');" | mysql -B --column-names=false` ; do
32 #    backup_cmd2 "/bkp/storage-local/$(hostname -s)/MYSQL/$dbname" "$(hostname -f)--MYSQL-$dbname" "mysqldump --single-transaction --quick --add-drop-table --add-drop-trigger $dbname" "-d7 -w7 -m35" "PASSPHRASE_CHANGEME"
33 #done
34
35
36 # backup (local + borgbackup 1)
37 #backup "/bkp/storage-local/$(hostname -s)/etc.enc"      "$(hostname -f)" "/etc"  "-d7 -w7 -m35" "PASSPHRASE_CHANGEME"
38 #backup "/bkp/storage-local/$(hostname -s)/etc"          "$(hostname -f)" "/etc"  "-d7 -w7 -m35"
39 #backup "/bkp/storage-local/$(hostname -s)/root"         "$(hostname -f)" "/root" "-d7 -w7 -m35"
40 #backup "/bkp/storage-local/$(hostname -s)/var"          "$(hostname -f)" "/var"  "-d7 -w7 -m35"
41 #backup "/bkp/storage-local/$(hostname -s)/srv"          "$(hostname -f)" "/srv"  "-d7 -w7 -m35"
42
43 # backup (local + borgbackup 2)
44 #backup2 "/bkp/storage-local/$(hostname -s)/etc.enc.b2"  "$(hostname -f)" "/etc"      "-d7 -w7 -m35" "PASSPHRASE_CHANGEME"
45 backup2 "/bkp/storage-local/$(hostname -s)/etc.b2"      "$(hostname -f)" "/etc"      "-d7 -w7 -m35"
46 backup2 "/bkp/storage-local/$(hostname -s)/root.b2"     "$(hostname -f)" "/root"     "-d7 -w7 -m35"
47 backup2 "/bkp/storage-local/$(hostname -s)/var.b2"      "$(hostname -f)" "/var"      "-d7 -w7 -m35"
48 backup2 "/bkp/storage-local/$(hostname -s)/srv.b2"      "$(hostname -f)" "/srv"      "-d7 -w7 -m35"
49
50 # backup (remote + borgbackup 2)
51 #backup2 "ssh://backup/home"                             "$(hostname -f)" "/home.b2"  "-d7 -w7 -m5"