Full WordPress Backup


Only recently before writing this post my unRaid server ended up having my docker containers and image get corrupted spectacularly, and not having a recent backup I had to resort to reinstalling and reconfiguring my docker containers from scratch. I luckily had a backup a few months old that helped with a few containers such as NGNIX Proxy Manager, others such as my MariaDB database container sadly had to be redone from the beginning.

While this situation was unfortunate and annoying having to redo my dockers on the server, this turned out to be a blessing in disguise as I could rectify mistakes that I made when I first started populating my docker image as well as conduct research on how to better manage creation of backups when this situation (no doubt it will happen again!) happens again.

I needed to find a safe and easy way to backup my WordPress. This website you are viewing uses WordPress as the backend for the blog section and I needed to find out the best and easy way to backup and restore a complete ‘image’ of my WordPress such as posts, settings, media etc. Alas there is a way to do this, if it wasn’t for this incident I wouldn’t have done my research!

Tutorial

What do I need?

  • Running a unRaid server with WordPress container running
  • upDraftPlus WordPress plugin
  • ftpro Plugin

Note for my setup I’m using the unRaid ZFS Plugin to run my pool but this will easily work for a normal default pool setup.

Create a ftp Server

Go to the Apps section and search for “ProFTPd” and install, there won’t be anything to configure as that will be done in the Settings section of unRaid.

Go to the Settings section and under “Network Services” click “ProFTPd”. There all we have to do is click on the “Enable ProFTPd” drop down and select Yes, and then click on “Apply” to enable the plugin.

Next is to create a new user for the plugin, go to the Users section, create a new user with the username “netvn” and a password of your choice. Make a note of what you used as we will need them later to configure the settings in WordPress.

Lastly on the unRaid side of setting up, you will need to create a new share for where the backups will go to. You can name the share whatever you please, I simply named mine “ftp” and because I am using the ZFS Plugin for my pool, I needed to create my share in “smb-extra.conf”. You won’t need to do that if you are using the default unRaid pool system. Finally in the root of the share you need to create a folder, doesn’t matter the name. I named mine “wordpress_backup”.

[ftp]
path=/mnt/zfs/ftp
browseable = yes
guest ok = yes
read only = no
writable = yes
create mask = 0711
directory mask = 0711
valid users = netvn
write list = netvn
force user = root

WordPress & UpdraftPlus

Within WordPress, go to “Plugins”, “Add New” and search for “UpdraftPlus” and activate the plugin to install.

Go to the plugin Settings, there you can set the schedule for backups, choose a remote storage such as Dropbox or Google Drive but instead we will choose “FTP” to have our backups hosted on the server.

For “FTP Server” put in the unRaid server IP Address, the user name we created earlier for the login, the password and the remote path.

Click on “Test FTP Settings” to confirm everything is working accordingly.

There you have it! You now have an automated backup system in place for WordPress hosted on your server.


Leave a Reply

Your email address will not be published. Required fields are marked *