# CWDB Archive
DNSIP AddressLocOSVerServices
cwdb-archive172.16.1.129Internal VMSLES12null
## 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](https://kb.mlc-wels.edu/_export/code/disaster/servers/cwdb-archive?codeblock=1 "Download Snippet")
``` #!/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 ```