Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
3 Registered (andreya, MikeBTech, Rascal), 21 Guests and 23 Spiders online.
Key: Admin, Global Mod, Mod
Top Posters
Gizmo 11678
Rick 7551
Ian 4099
Mark S 3969
ntdoc 3102
Sirdude 2041
jgeoff 1876
David Dreezer 1750
driv 1557
AllenAyres 1523
Latest Photos
Carrie - So Very
Testing
Test Photo
4TH of July at the river!
Test shots from D300 part 3
Topic Options
Rate This Topic
#191156 - 07/14/07 04:43 PM How do I backup my forums?
Gizmo Moderator Offline


Registered: 06/04/06
Posts: 11678
Loc: Portland, OR; USA
The recommended method is listed below; this is not the only method but it's what tends to go the fastest (especially with larger forums). We only recommend using the built in "backup database" tool as a last resort as it'll take forever to run on even a moderately small forum.

Please Note: MySQL File Creation times, Compression Times, Extraction Times, and Download Times will vary based on Server Resources, Database and Archive size, and Internet Connection Speed.
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#191157 - 07/14/07 04:44 PM Re: How do I backup my forums? [Re: Gizmo]
Gizmo Moderator Offline


Registered: 06/04/06
Posts: 11678
Loc: Portland, OR; USA
MySQL Backup in Unix or Linux
If you're on a Linux/Unix machine, you can use the Command Line tools via SSH to create a database dump (backup of the mysql database) by inserting the command:
 Quote:
mysqldump -uusername -ppassword databasename > databasename.sql


If you wish to compress the above output so that it's easier to transfer around, then you can do:
 Quote:
tar -cvpzf databasename.tgz databasename.sql


If you've compressed the output and would like to decompress it, then you can run:
 Quote:
tar -xzvf databasename.tgz

(the output will extract as databasename/databasename.sql)

And to restore said backup, after you purge data out of the MySQL database:
 Quote:
mysql -h localhost -uusername -ppassword databasename < databasename.sql
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#191159 - 07/14/07 04:54 PM Re: How do I backup my forums? [Re: Gizmo]
Gizmo Moderator Offline


Registered: 06/04/06
Posts: 11678
Loc: Portland, OR; USA
File Backup in Linux or Unix
You can easily backup your entire UBB.threads directory (with or without the cache) with a quick one liner:

Without the Cache:
 Quote:
tar -cvpzf forum_backup.tgz /path/to/your/forum --exclude-from=/path/to/your/forum/cache


With the Cache:
 Quote:
tar -cvpzf forum_backup.tgz /path/to/your/forum


Extracting the Backup:
 Quote:
tar -xzvf forum_backup.tgz
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#191164 - 07/14/07 05:14 PM Re: How do I backup my forums? [Re: Gizmo]
Gizmo Moderator Offline


Registered: 06/04/06
Posts: 11678
Loc: Portland, OR; USA
PHPMyAdmin Notice
I myself don't recommend that you create your database backup from within PHPMyAdmin (or any other web script) as it can take much longer than the aforementioned methods as you're hopping through the webserver to do something that it doesn't really need to be doing.

Another issue with using PHP scripts to create a database dump is that you could end up hitting the "PHP Maximum Execution Time" limit which is usually about 60 seconds... If this is the case, the archive you're presented with will generally not be complete and you'll end up with missing records. This is generally not a problem with databases under 100mb or so; but is still something one would have to worry about.
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top


Moderator:  Gizmo 
Shout Box

Recent Topics
Community Spotlight
by Thelockman
Today at 08:04 AM
Protecting Board from hackers
by duquesne
Today at 04:48 AM
Change New Topic text
by MLD
08/25/08 04:59 PM
Reason for deleting a thread
by MattUK
08/24/08 09:40 PM
Adding rss feed to a custom portal island
by alex26101
08/23/08 09:29 PM
Forum Stats
4016 Members
33 Forums
30842 Topics
156618 Posts

Max Online: 978 @ 06/24/07 08:19 PM