Rev 29000 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/bashBACKUP_DIR=/root/.backup/dailySERVER=192.168.190.112BACKUP_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.sqlmysql -uroot -pshop2020 < dump.sql