2 ################################################
3 ### Managed by someone's ansible provisioner ###
4 ################################################
5 # Part of: https://git.somenet.org/root/pub/somesible.git
6 # 2017-2024 by someone <someone@somenet.org>
8 # beware of pruning logic.
9 # replace "passphrase" with something useful, or delete it for no encryption.
13 #backup_cmd "backup:POSTGRES/_GLOBAL_" "$(hostname -f)--POSTGRES" "sudo -u postgres -- pg_dumpall --globals-only" "-d13 -w7 -m24" "passphrase"
14 #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
15 # backup_cmd "backup:POSTGRES/$dbname" "$(hostname -f)--POSTGRES-$dbname" "sudo -u postgres -- pg_dump --clean --if-exists --create $dbname" "-d13 -w7 -m24" "passphrase"
20 #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
21 # backup_cmd "/bkp/storage-local/$(hostname -s)/MYSQL/$dbname" "$(hostname -f)--MYSQL-$dbname" "mysqldump --single-transaction --quick --add-drop-table --add-drop-trigger $dbname" "-d13 -w7 -m24" "passphrase"
26 #backup "/bkp/storage-local/$(hostname -s)/etc.enc" "$(hostname -f)" "/etc" "-d13 -w7 -m24" "passphrase"
27 backup "/bkp/storage-local/$(hostname -s)/etc" "$(hostname -f)" "/etc" "-d13 -w7 -m24"
28 backup "/bkp/storage-local/$(hostname -s)/root" "$(hostname -f)" "/root" "-d13 -w7 -m24"
29 backup "/bkp/storage-local/$(hostname -s)/var" "$(hostname -f)" "/var" "-d13 -w7 -m24"
30 backup "/bkp/storage-local/$(hostname -s)/srv" "$(hostname -f)" "/srv" "-d13 -w7 -m24"
34 #backup "backup:home" "$(hostname -f)" "/home" "-d13 -w7 -m6"