Home > Backup, Linux, Raspberry Pi > Backing up Der Flounder Revisited
Nine years ago, I wrote a post on how I backup this blog. Overall, the reasons I’m backing up haven’t changed:
To create the backups, I make a nightly mirror using HTTrack. As time has passed and host machines were replaced, I’ve moved the backup host a few times. For the last move, I decided for budgetary reasons to move off of using Macs and onto a Raspberry Pi. For those wanting to know more, please see below the jump.
The current backup host is a Raspberry Pi 3 Model B running Raspbian Buster, which is closely based on Debian Linux.To set up an automated backup using HTTrack, I used the following procedure:
1. Installed HTTrack for Debian by running the commands below with root privileges:
apt-get update apt-get install webhttrack
2. Creating a backup directory in the pi user’s home directory by running the following command:
mkdir -p /home/pi/derflounder_backup
2. Set up the following script as /usr/local/bin/der_flounder_backup.sh
#!/bin/bash backupDirectoryPath="/home/pi/derflounder_backup" /usr/bin/httrack "https://derflounder.wordpress.com/" -O "$backupDirectoryPath" "+https://derflounder.wordpress.com/*" "+https://derflounder.files.wordpress.com/*" -v
For the script itself:
4. Set up a cron job like the one shown below to run the backup script. In my case, I set it up in the pi user’s crontab to run nightly at 2:00 AM:
0 2 * * * /usr/local/bin/der_flounder_backup.sh
Meanwhile, like the Macs who did this job before it, I’m also backing up the Raspberry Pi that the backup is stored on, so that I have multiple copies of the backed-up data available.