It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.

Backup Guide · Article

What Is Covered

Summary
Manual Backups
     • Creating Manual Backups
The UBB.threads Backup Utility
     • Using the UBB.threads Backup Utility
Creating a File Backup
     • Using "tar" to Create a Backup of Files


 

Summary


Creating regular backups of your forum, or site, is a very important item to followup on; many users assume "I installed the software and it is working, so I am good to go", but what about when something happens when upgrading the software, or moving your site to another host, or just a random server hiccup that results in issues that can't be resolved without a backup to at least restore the site to the previous state? Another item to consider is when your web host makes some changes that result in a corrupted file or a database, the result is your forum becoming unusable.

The best suggestion is to create regular backups of the forum database as well as the files located in your forum directory, in case of catastrophic failure, or operator error. Going about making a backup and using it to restore your site can be complicated depending on what method you use. For new users, it's not just making a FTP backup of your site, but also to backup the MYSQL Database tables where your forum data is stored.

The UBB.threads Backup Utility does not make backups of your forum files, which may have been modified, which means that there generally aren't backups of your config.inc.php file. The configuration file contains all the settings and important info that make your forum operate. Making a full backup of your forum, or entire site, requires creating a backup of your site files and a backup of your MySQL Database.

Note
Most web hosts do in fact make regular backups of their servers, and perhaps your web space, but they are just to restore the server and your account; not necessarily just your data. If they do create backups, they can charge a additional fee to restore your files, then the issue becomes how old is the backup.


Our parent organization VNC Web Services offers Migration and Backup Services so that you can minimize any possible downtime.



 

Manual Backups


A Manual Backup is the recommendation, as you're creating a backup directly on the server and can observe any errors. The caveat would be that some hosts do not supply access to SSH to manage your site; which is required to utilize the "mysqldump" and "tar" utilities on the server.


 

Creating Manual Backups


Creating a Database Backup


Database backups are created via SSH (a secure utility for accessing the server via a Command Line Interface) using the "mysqldump" command, your query would be something similar to::
mysqldump -uusername -ppassword my_database_name > my_database_name.sql

So, if your username is "gizmo", your password is "awesomesauce", your database name was "myawesomewebsite", and you wanted the file created wherever you're currently at on the server, your command would be:
mysqldump -ugizmo -pawesomesauce myawesomewebsite > myawesomewebsite.sql

Note
You can also use the "tar" command to compress your MySQL backup, the command would be similar to:
tar -cvpzf my_ubb_database.tgz my_database_name.sql



 

The UBB.threads Backup Utility


UBB.threads v7.x comes with a backup utility to create a simple backup of your MySQL database. A caveat here, however, is that larger databases (over say 50MB) could hit the PHP Max Execution time limit, leaving you with what seems like a solid backup of your database, but is really just the data it could pull together before the time limit is reached. We would in EVERY case advise that you make a Manual Backup as there is no PHP limit as the backup is created with direct output from the MySQL server via a SSH connection.

The UBB.threads Backup Utility will only backup your MySQL Database and will not archive your forum files, attachments, uploads, avatars, etc. Restoring files from the UBB.threads Backup utility require that you restore each table individually, versus a single backup file that the Manual Backup will offer; with 60+ tables, restoring from backup with the UBB.threads Backup Utility would take a substantial amount of time.

 

Using the UBB.threads Backup Utility


To get started go to:
     Control Panel -> Database Tools

Select the "Backup Tables" tab and the first option to select is:
     Backup Storage Directory:

You'll want to create a new folder to house your backups, we would recommend that this directory not be accessible from the web as anyone with the name of the target directory would be able to access your generated backups; generally you would create this folder via FTP or SSH, you should chmod this folder "777".
If your web root is /home/example/public_html we would recommend your UBB.threads backup directory to be /home/example/ubb-backups


The path you enter is a absolute path, from the server root (you can find the path to your web space via the UBB.threads System Requirements Test or via the "PHP Info" section of the UBB.threads Control Panel).

After populating the backup storage folder, the next step would be to click on the "(Click to test directory)" link; this will write a small file to the folder specified to test if it can be written to. This is an important step, so please take care to not skip it.

The next option is "Add a Drop Table Statement", this adds an option to your backups to replace existing tables; you should always select this option so that you can restore the tables when you go to restore the backup, otherwise you'll have to "empty" the tables before attempting to restore the data.

Next you can select if you'd like to backup individual tables, or all of them; we suggest that you back up all of the tables.

Now you'll want to select the submit button to begin the backup process. Do not press stop, or close your browser, during the backup creation; it will take quite a bit of time to generate MySQL backups, depending on how large your forum is. When the process has completed, remember that your files are backed up in the storage directory that you previously specified, and that you'll need to download them to your local device to keep an off site backup.


 

Creating a File Backup


Backing up your site files is generally a simple task; you can opt to use "tar" via SSH (see syntax below in the "Using "tar" to Create a Backup of Files" section below) or you can use an FTP utility, such as Filezilla, or a utility supplied by your host (such as CPanel, UserMin, etc.). You will need to backup all of your UBB.threads files and folders.

 

Using "tar" to Create a Backup of Files


Backups of your file system would be created using the command "tar", which is an archival utility. The command issued would be:
tar -cvpzf my_ubb_backup.tgz /path/to/threads

Posted By Gremelin Posted on October 5th, 2014 · Updated on January 13th, 2017
▼ Sponsored Links ▼
▲ Sponsored Links ▲

Comments

( Posted)