diff options
author | NOYB <Al_Stu@Frontier.com> | 2016-05-18 18:14:31 -0700 |
---|---|---|
committer | NOYB <Al_Stu@Frontier.com> | 2017-01-08 19:14:16 -0800 |
commit | 0869605131ba3e5d7e502af7a799e54f27d2e7f6 (patch) | |
tree | 29718c5ab7e6a69c71bced2a693ebe264d62294f /src/etc/rc.backup_aliastables.sh | |
parent | 257d2fd6750185a52b703cffd9419737f83777ee (diff) | |
download | pfsense-0869605131ba3e5d7e502af7a799e54f27d2e7f6.zip pfsense-0869605131ba3e5d7e502af7a799e54f27d2e7f6.tar.gz |
RAM Disk Management - Update I - Eliminate RRD XML Dump/Restore & Alias Tables Backup Age Logic
Eliminate rrd dump/restore to/from xlm file. Backup and restore the entire /var/db/rrd/ to/from the RAM Disk Store.
Add logic to backup alias tables if the backup is older than the table.
Diffstat (limited to 'src/etc/rc.backup_aliastables.sh')
-rwxr-xr-x | src/etc/rc.backup_aliastables.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/etc/rc.backup_aliastables.sh b/src/etc/rc.backup_aliastables.sh index c016e55..b25d20c 100755 --- a/src/etc/rc.backup_aliastables.sh +++ b/src/etc/rc.backup_aliastables.sh @@ -15,7 +15,8 @@ if [ -d "${DBPATH}" ]; then for aliastablefile in "${DBPATH}"/* ; do filename="$(basename ${aliastablefile})" - if [ ! -f "${RAM_Disk_Store}/${filename}.tgz" ]; then + if [ ! -f "${RAM_Disk_Store}/${filename}.tgz" -o "${RAM_Disk_Store}/${filename}.tgz" -ot "${DBPATH#/}/${filename}" ]; then + [ -f "${RAM_Disk_Store}/${filename}.tgz" ] && /bin/rm -f "${RAM_Disk_Store}/${filename}.tgz" /usr/bin/tar -czf "${RAM_Disk_Store}/${filename}.tgz" -C / "${DBPATH#/}/${filename}" fi done |