3 # Syncs your monitorix rrd databases in virtual memory on/dev/shm/monitorix
4 # and uses rsync to keep it backed-up to your hdd. Why do this? It minimizes
7 # Note that this script was adapted from one originally written by Pwd which you
8 # can find here http://wiki.archlinux.org/index.php/Speed-up_Firefox_using_tmpfs
10 STATIC
=/var
/lib
/monitorix-backup
11 LINK
=/var
/lib
/monitorix
12 VOLATILE
=/dev
/shm
/monitorix-data
# recommend you do NOT use /tmp if you use bleachbit
14 [[ -r $VOLATILE ]] ||
install -dm755 $VOLATILE
16 if [[ `readlink $LINK` != $VOLATILE ]]; then
21 if [[ -e $LINK/.flagged
]]; then
22 rsync
-av --delete --exclude .flagged
$LINK/ $STATIC/
24 rsync
-av $STATIC/ $LINK/