Subversion Repositories SmartDukaan

Rev

Rev 29000 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/bin/bash
BACKUP_DIR=/root/.backup/daily
SERVER=192.168.190.112
BACKUP_FILE=$(sshpass -p shop2020 ssh $SERVER 'ls -t /root/.backup/daily | head -1')
sshpass -p shop2020 scp $SERVER:$BACKUP_DIR/$BACKUP_FILE .
gunzip -f ./$BACKUP_FILE dump.sql
mysql -uroot -pshop2020 < dump.sql