ramdisk: Backup ramdisks once a night

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2015-12-15 13:47:52 +00:00
parent 429524c040
commit 08729f79fb
4 changed files with 30 additions and 3 deletions

View File

@@ -124,8 +124,15 @@ case "$1" in
statusproc /usr/sbin/collectd
;;
backup)
# Backup all data if ramdisk is used
if mountpoint "${RRDLOG}" &>/dev/null; then
${0} restart
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
echo "Usage: $0 {start|stop|restart|status|backup}"
exit 1
;;
esac

View File

@@ -21,8 +21,16 @@ case "$1" in
stop)
umount_ramdisk "${VNSTATLOG}"
;;
backup)
# Backup all data if ramdisk is used
if mountpoint "${RRDLOG}" &>/dev/null; then
${0} restart
fi
;;
*)
echo "Usage: $0 {start|stop}"
echo "Usage: $0 {start|stop|backup}"
exit 1
;;
esac