Home > Backup, Linux, Raspberry Pi > Backing up Der Flounder Revisited

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:

  • I like this blog and don’t want to see it or its data disappear because of data loss.
  • WordPress.com’s free hosting doesn’t provide me with an automated backup method.

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



/usr/bin/httrack "https://derflounder.wordpress.com/" -O "$backupDirectoryPath" "+https://derflounder.wordpress.com/*" "+https://derflounder.files.wordpress.com/*" -v

For the script itself:

  • I’m first specifying the starting point. In this case, it is https://derflounder.wordpress.com/.
  • We can specify where the mirrored data will go using the -O flag (note that $backupDirectoryPath is a path I defined earlier on in my script. In this case, the data is being stored in /home/pi/derflounder_backup.
  • The quotations where I have “+” with something are urls from which it is allowed to download, and process. If you do not specify any, it will only download from the domain you specify.
  • The “-v” flag specifies httrack to run in verbose mode.

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.

Categories: Backup, Linux, Raspberry Pi
  1. March 10, 2021 at 1:54 pm

    You can always set up a “local” installation of WordPress (via Local or DevInsta at least) and export the XML file from here and then import it back over the local install.
    If this domain is still alive the import will copy on your local installation also the files/images.

    But your method is surely a great (gekk) approach.

  2. March 10, 2021 at 1:57 pm

    I just took the chance to backup my blog and discovered the renews Export page https://wordpress.com/export/$YOURDOMAIN.wordpress.com

    Hope it helps

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: