Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Backups[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Mon, Sep 27, 2021 09:06 PM UTC:

I now have a script set up that runs from the backup server to make daily backups of both the /home/chessvariants/public_html/ directory and the chessvariants database every midnight at Eastern Standard Time. The script looks like this, but with the actual database password. It doesn't need the server password, because it is using an SSH key pair to connect.

#1/bin/bash
mv /root/chessvariants.sql /root/chessvariant-backup.sql
ssh root@ftp.chessvariants.com mysqldump --opt --user=root --password=XXXXXX chessvariants > /root/chessvariants.sql
/usr/bin/rsync -ae ssh --delete root@ftp.chessvariants.com:/home/chessvariants/public_html/ /home/chessvariants/public_html/
touch /home/chessvariants/public_html/
mysql --password=XXXXXX chessvariants < /root/chessvariants.sql