It is recommended to make regular backups, especially before major updates, to avoid major data loss. This article describes which steps are necessary to completely and reliably back up the data of your WoltLab Suite installation.
This article is intended for customers who run the software independently on their own server or web hosting.
Having backups is great, but then they should not be 6 months old or completely broken. You should follow these basic recommendations:
- The data of a WoltLab Suite installation consists of the contents of the corresponding database and the files in the file system. Both should be backed up and have the same version at the same time. When restoring a backup later, the backup of the database and the file system must also have the same version.
- Check regularly that the backups are complete.
- Check regularly that backups are actually created, for example if you have automated the process using cronjobs.
- Make regular backups of your installation. For smaller communities one backup per week is usually sufficient, for larger communities a daily backup is recommended. A backup should also be created before you make major changes to your installation.
- Many web hosters regularly create automatic backups of customer data. Although this is good in principle, you should not rely completely on it and also create regular backups yourself.
- Some web hosters offer functions for creating and restoring backups via their configuration interface. Use these functions if possible.
Create a Backup#
Backup with SSH
If available, it is recommended to use command line commands via SSH to create backups, as this is usually faster and more reliable.
It is recommended to pack the files into a so-called tarball (.tar archive).
This is done with the following command:
tar cf backup.tar -C <path to your files> .
Then you can download this tarball, it contains all files of the installation.
For example, you can backup the database using the following command:
mysqldump -h localhost -u <username> -p --single-transaction --skip-lock-tables --net_buffer_length 16384 <database> > backup.sql (adjust the values for hostname, username and database to your database access data)
You can then download the .sql file and remove it from the server.
Backup without SSH
Connect with your FTP program to your web hosting and download all files of the installation. Make sure that the files are transferred in binary mode to ensure that files are not damaged.
Use programs such as phpMyAdmin to create a database backup. Many web hosters already offer ready-made solutions for this in the administration interface.
Make sure that the programs you use to create the backup are up to date. Older software versions or software that is no longer being developed may result in the backup being incomplete or defective.
Restore a Backup#
Restore with SSH
Upload the tarball with the saved files and unpack it with the following command:
tar xvf backup.tar
Upload the backed up .sql file and start the database restore with the following command
mysql -h localhost -u <username> -D <database> < backup.sql (adjust the values for hostname, username and database to your database access data)
Restore without SSH
Connect with your FTP program to your web hosting and upload the previously backed up files of the installation. Make sure that the files are transferred in binary mode to ensure that files are not damaged.
Use programs such as phpMyAdmin to restore a database backup.