Express Hosting
"We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#177934 - 02/07/0705:56 PMRe: Not sure I understand how to backup my boards.
[Re: luket]
Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
I don't recommend backing up via the forum, it's going to take way longer than how it would be if you where to do it via MySQL directly through the command line (via SSH for example).
Also, all the data is would be text, so if you have it compressed (tar or gz for example) it will be tiny.
The command to create a backup of a mysql database: MySQL Export: mysqldump -uuser -ppass db > db.sql MySQL Import: mysql -h localhost -uuser -ppass db < db.sql
Please note that the -u -p and -h are required and that you must add in your username password and database name.
So you are saying "yes, all of the forum data would be in these backup files" ...
Then I'm wondering if there isn't a bug. There is no way to compress 300 meg to 5 .. I ran a test and compressed my Fourm28: It's 19K files and 172 meg. It Zip'ed to 41 meg.
I may know what happened then. When I was running the backup from the control panel (even though you do not recommend doing this :p) I DID notice something very strange… I saw one of the .sql files changing size! I'm sorry, I do not remember the name, but let's say it was ubbt_foo.sql … As I watched the directory during the backup, this file would change to 200K, then 300K, then 200K, then 400K, then 200K… and it kept doing this until the backup finished.
Theory: Each forum was backed up to a single output file, overwriting the output from the forum before it. I speculate that the backup is everything + 1 forum (the last one backed-up.)
_________________________
Member since November 2004 Gold Member since Feb 2008
Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
If your backup was downloaded as a tar or a tgz file using the compression of the script you made the backup with; yes. If you have a .sql file, it is not likely, and is more likely that the script you used to generate the backup choked and fed you what it had recieved.
Also, ZIP is a way differant algoritm than Tar or Global Zip; or Tar and Global Zip togethre.
And it's quite odd that the file would change size like that, possibly a bug or something :shrug: I don't use scripts to make backups as you end up with either many files, lots of lag, or things that just doont' work properly
Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
Well, keep in mind that this isn't classic; posts aren't stored in files which repeat the same data over and over only with posts included; so it is actually possible.
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
In the 7.0.x versions there is a bug in the backup where it's not backing up some of the tables on some servers. This got a bit of an overhaul for 7.1 to fix this.
Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
Code:
[root@server blah]# mysqldump -uuser -ppass db > db.sql
Enter password:
[root@server blah]# ls -hal
total 56M
drwxr-xr-x 2 root root 4.0K Feb 7 17:54 .
drwxr-x--- 11 root root 4.0K Feb 7 17:54 ..
-rw-r--r-- 1 root root 55M Feb 7 17:55 ubb.sql
[root@server blah]# tar -cvpzf db.tgz ubb.sql
ubb.sql
[root@server blah]# ls -hal
total 67M
drwxr-xr-x 2 root root 4.0K Feb 7 17:55 .
drwxr-x--- 11 root root 4.0K Feb 7 17:54 ..
-rw-r--r-- 1 root root 12M Feb 7 17:56 db.tgz
-rw-r--r-- 1 root root 55M Feb 7 17:55 ubb.sql
Well my 58mb database has shrank to 12mb with the compression; my UBB.Classic files where over 800mb though, as an example to how text compresses down when it's just text.