Getting ready for a Bitnami WordPress backup? Find out what our experts have to say to make the task easier.
There are two approaches available for backing up Bitnami WordPress. Read on to find out which approach works for you according to our Support Engineers at Bobcares.
All about Bitnami WordPress backup
The recent changes to the configuration and file structure of Bitnami stacks have resulted in two approaches for backing up WordPress. In order to identify the Bitnami installation type and the corresponding approach to follow, use this command:
test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach 1: Using system packages." || echo "Approach 2: Self-contained installation."
Hence, the resulting output determines whether to follow approach 1 or approach 2 for your Bitnami WordPress backup.
Approach 1 for Bitnami WordPress backup: Bitnami installations using system packages
This approach involves copying or compressing the directories. Let’s see how it is done:
- First, change to the directory where you want to save the backup.
cd /your/directory
- Next, stop all servers with the following command:
sudo /opt/bitnami/ctlscript.sh stop
- After that, create a new compressed file of the directory that has the application data files with this command:
sudo tar -pczvf application-backup.tar.gz bitnami
- In order to take a full backup, create a compressed file of the directory with the application binaries as well as runtime files.
sudo tar -pczvf application-bin.tar.gz /opt/bitnami
- Then restart the servers with the command:
sudo /opt/bitnami/ctlscript.sh start
In other words, you will now be able to transfer or download the application-bin.tar.gz and application-backup.tar.gz files to a secure location.
Restore Backup:
Now, the next step is to restore the backup as seen below:
- First, change to the directory where your backup file is:
cd /your/directory
- Then, stop the servers with the command:
sudo /opt/bitnami/ctlscript.sh stop
- Next, transfer the current stack to a different location with the command:
sudo mv /opt/bitnami /tmp/bitnami-backup
- After that, uncompress the backup file to the original directory with the command:
sudo tar -pxzvf application-backup.tar.gz -C /
- For a full backup, you need to uncompress the backup files of the application binaries and runtime file as well to the original directory:
sudo tar -pxzvf application-bin.tar.gz -C /
- Finally, start all servers with the command:
sudo /opt/bitnami/ctlscript.sh start
Approach 2 for Bitnami WordPress backup: Self-contained Bitnami installations
Our Support Engineers suggest this approach to create a backup for self-contained Bitnami installations:
- First, change to the directory where you want to save the backup:
d /your/directory
- Then, stop all servers with this command:
sudo /opt/bitnami/ctlscript.sh stop
- After that, create a compressed file containing the stack contents with this command:
sudo tar -pczvf application-backup.tar.gz /opt/bitnami
- Finally, restart all servers with the command:
sudo /opt/bitnami/ctlscript.sh start
In conclusion, you will now be able to transfer or download application-backup.tar.gz file to a secure location.
Restore Backup:
Now, the next step is to restore the backup as seen below:
- First, change to the directory where your backup file is:
cd /your/directory
- Then, stop all servers with the command:
sudo /opt/bitnami/ctlscript.sh stop
- Next, move the current stack to another location with the command:
sudo mv /opt/bitnami /tmp/bitnami-backup
- After that, uncompress the backup file with the following command:
sudo tar -pxzvf application-backup.tar.gz -C /
- Finally, restart all the servers:
sudo /opt/bitnami/ctlscript.sh start
Remember to keep the original permissions for the folders and files while backing up your Bitnami WordPress.
[Need an extra hand? We are here at your service.]
Conclusion
In short, we learned how to backup and restore Bitnami WordPress without too much trouble. The proficient Support Engineers offered two different approaches for the backup based on the installation type.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments