CWDB Archive
DNS | IP Address | Loc | OS | Ver | Services |
---|---|---|---|---|---|
cwdb-archive | 172.16.1.129 | Internal VM | SLES | 12 | null |
Installation
SLE Modules
-
Software Development Kit
-
Web and Scripting
Users
-
archive
Cron Jobs
Archive
Runs the cleanup script for old backups. Currently only keeping a weeks worth of backups (including WAL archives).
15 4 * * * /home/archive/bin/clean_old_backups.sh >/dev/null 2>&1
CWDB Backups
Locations
-
/home/archive/cwdb
is the main directory -
/home/archive/cwdb/wal
directory holds the WAL archives -
/home/archive/cwdb/data
has a dated directory for each date a full binary backup has been done
Backup Pruning
Currently we keep only a week of backups. This script it run every night and delete the oldest backup.
- clean_old_backups.sh
-
#!/bin/bash DATA_BACKUP_DIR=/home/archive/cwdb/data/* WAL_ARCHIVE_DIR=/home/archive/cwdb/wal/* find /home/archive/cwdb/data/* -maxdepth 0 -type d -mtime +6 -exec rm -rf {} \; find /home/archive/cwdb/wal/* -maxdepth 0 -mtime +6 -delete