#!/bin/bash
LADATE=`date +%Y%m%d`
BACKUP=backup/prod.sqlite.$LADATE

pushd ../../../backend/data/db/
if [ ! -f $BACKUP ]; then
    mv prod.sqlite $BACKUP
fi
rm -f prod.sqlite
wget https://www.topisto.net/smeti/backend/data/db/prod.sqlite
chmod a+w prod.sqlite
popd

sync

