# ################################################ ### Managed by someone's ansible provisioner ### ################################################ # Part of: https://git.somenet.org/root/pub/somesible.git # 2017-2024 by someone # # beware of pruning logic. # # postgresql backup. #backup_cmd "backup:POSTGRES/_GLOBAL_" "$(hostname -f)--POSTGRES" "sudo -u postgres -- pg_dumpall --globals-only" "-d13 -w7 -m24" "passphrase" #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 # backup_cmd "backup:POSTGRES/$dbname" "$(hostname -f)--POSTGRES-$dbname" "sudo -u postgres -- pg_dump --clean --if-exists --create $dbname" "-d13 -w7 -m24" "passphrase" #done # mysql backup. #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 # backup_cmd "/bkp/storage-local/$(hostname -s)/MYSQL/$dbname" "$(hostname -f)--MYSQL-$dbname" "mysqldump --add-drop-database=true $dbname" "-d13 -w7 -m24" "bulb8Who2burly" #done # local backup. #backup "/bkp/storage-local/$(hostname -s)/etc.enc" "$(hostname -f)" "/etc" "-d13 -w7 -m24" "passphrase" backup "/bkp/storage-local/$(hostname -s)/etc" "$(hostname -f)" "/etc" "-d13 -w7 -m24" backup "/bkp/storage-local/$(hostname -s)/root" "$(hostname -f)" "/root" "-d13 -w7 -m24" backup "/bkp/storage-local/$(hostname -s)/var" "$(hostname -f)" "/var" "-d13 -w7 -m24" backup "/bkp/storage-local/$(hostname -s)/srv" "$(hostname -f)" "/srv" "-d13 -w7 -m24" # remote backup. #backup "backup:home" "$(hostname -f)" "/home" "-d13 -w7 -m6"