Check out Symmetric Chess, our featured variant for March, 2024.


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

Comments/Ratings for a Single Item

Later Reverse Order Earlier
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 [email protected] mysqldump --opt --user=root --password=XXXXXX chessvariants > /root/chessvariants.sql
/usr/bin/rsync -ae ssh --delete [email protected]:/home/chessvariants/public_html/ /home/chessvariants/public_html/
touch /home/chessvariants/public_html/
mysql --password=XXXXXX chessvariants < /root/chessvariants.sql

🕸Fergus Duniho wrote on Sat, Sep 25, 2021 01:05 PM UTC in reply to Fergus Duniho from 02:50 AM:

The touch command was used on the new server's /home/chessvariants/public_html/ directory at 12:00:14 AM EST. So, the automated daily backup worked when it was expected to. I'll look into including a backup of the database into the same script today. But since there are some different files in the folders for the database on each server, I want to fix that by making them both use the same version of MariaDB.


🕸Fergus Duniho wrote on Sat, Sep 25, 2021 02:50 AM UTC:

I have set up some cron jobs to do backups with rsync. On this server, rsync will create hourly, daily, weekly, monthly, and annual backups. These are in case it's important to revert a change to a script or page. Editors with access to the server can find these in /home/chessvariants/backups/.

The new server has a cron job to make a daily backup of the public_html directory on this server. I set up an SSH key pair to allow it to do this without a password. This will copy the /public_html/ for chessvariants.com to that for chessvariants.org. This is expected to happen at midnight EST. To be sure of what time it does it, I'll check the timestamp on the /public_html/ directory tomorrow, since I also made the script use the touch command on it when it is done updating. I still have not added commands for backing up the database. It will be important to do both together to keep their backups in sync.


3 comments displayed

Later Reverse Order Earlier

Permalink to the exact comments currently displayed.