#!/bin/bash
# archive la base si il y a une modification
cd /var/www/scrumblr/archives
redis-cli --rdb /tmp/redis_dump.rdb
rdb --command json /tmp/redis_dump.rdb > /tmp/dump.json
if [ ! `diff /tmp/dump.json ./dump.json > /dev/null` ]
then
	mv /tmp/dump.json .
	cp dump.json  dump_`date '+%y-%M-%d_%T'`.json
fi
exit 0

