Category Archives: QNAP

Safety first – How to backup WordPress (AWS) to Qnap (Homeoffice) via FTP

After the legal notice (“Impressum“) which is more or less mandatory in Germany you should think about a backup of your WordPress installation. If you ever lost a self written document you may know how frustrating it can be to write the same text again.

1. Prepare QNAP for backup via FTP

I am using selfhost.de as a DynDns provider, which is needed because my Homeoffice Internet IP address may change from time to time. My Homeoffice router Netgear WNDR4000 is not able to update the selfhost DynDNS IP so I am using the QNAP TS-421 instead. You can choose any DynDNS provider which your router or Qnap supports.

Environment which is in place already:

  • WordPress on AWS EC2 instance with Elastic IP
  • AWS Route 53 with tfindelkind.com registered and pointing to Elastic IP (WordPress)
  • Netgear Router with dynamic Internet IP address
  • Selfthost.de DynDNS account with an registered DynDNS like tfindelkind.selfhost.eu
  • QNAP up and running and a backup folder created like “tfindelkind-com”

AWS-HomeOffice

Setup Netgear WNDR-4000 FTP port forwarding

  • Login to the Netgear router
  • switch to “ADVANCED”
  • click on “Advanced Setup”
  • Click on “Port Forwarding/Port Triggering”
  • Choose “FTP” and enter the IP of your QNAP and click “Add”

netgear_ftp

Setup QNAP TS-421 for DDNS with selfhost.de

  • Login to QNAP
  • Click on “Control Panel”
  • Click on “System Settings”
  • Click on “Network”
  • switch to DDNS Service
  • Click on “Enable Dynamic DNS Service”
  • Select “selfhost.de” as DDNS server
  • Enter Username (It is NOT the Account Name for selfhost.de, see DynDNS setup)
  • Enter password
  • Enter Host Name: tfindelkind.selfhost.eu
  • Click on “Apply” and the DDNS should be updated successfully

qnap_ddns

Setup QNAP FTP Server

  • Login to QNAP
  • Click on “Control Panel”
  • Click on “Network Services”
  • Click on “FTP”
  • Click on “Enable FTP service”
  • Set “Enable anonymous” to “No”

qnap_ftp

Setup FTP User

  • Login to QNAP
  • Click on “Control Panel”
  • Click on “Privilege Settings”
  • Click on “Users”
  • Click on “Create”
  • Enter Username “stupidftp”
  • Enter password 2x
  • Click on “Edit” at “Shared Folder Permission”
  • Allow only RW access to the backup folder “tfindelkind-com”
  • Click “Close”
  • Click on “Edit” at “Edit Application Privilege”
  • Allow only access to FTP Service
  • Click “Close”

qnap_user_shared_folder

Done.

2. WordPress Backup with BackWPup

I use BackWPup because its free. And it provides the following features which are important for my use case: automatic/scheduled backups, backup over ftp (Qnap) and be able to backup everything which is needed to backup and restore the whole WordPress installation.

BackWPup allows other destinations for the backup like the Amazon S3 storage or Dropbox. These can be cheap alternatives if you don´t have a QNAP or FTP filer at home.

  • WordPress 4.2.3 running on AWS EC2 instance (free tier)
  • Plugins: AntiSpam Bee 2.6.7 , BackWPup 3.1.4 ,Twitter 1.1.0, Yoast SEO 2.3.2

wordpress

Install the BackWPup Plugin

  •  If not already installed.
    • Go to Plugins -> Add new -> enter “BackWPup” in the search field
    • Click “Install now”

backWup_search

Create a backup job for BackWPup
After the plugin is installed there should be a new menu item on the left side. If you click it you should see the dashboard or you can just start to setup a backup job. In the next steps I create a backup job which should backup once a day at 22:00h the full WordPress installation.

  • Click on “Add new job”
  • Give your job a meaningful name “daily_full_backup”
  • Check all Jobs tasks for a full backup of your site: “Database backup, File backup, WordPress XML export, Installed plugins list”
  • Configure the destination: Choose “Backup to FTP”

backWup_job

  • Switch to the “Schedule” tab
  • Choose “with WordPress cron”
  • Choose “basic”
  • Choose “daily 22:00”

backWup_job_schedule

  • Switch to the “To: FTP” tab
  • Enter FTP server: “tfindelkind.selfhost.eu”
  • Enter Username: “stupidftp”
  • Enter password
  • Folder to store files in “tfindelkind-com”
  • Save changes

backWup_job_ftp

  • You should run the job right now to make sure everything is working correct

backWup_job_run

You just created a full backup of your WordPress installation.

Go docker hub!