|
Joined: Nov 2004
Posts: 198
Member
|
Member
Joined: Nov 2004
Posts: 198 |
I must not understand how this works, but I would assume all data would be backed up such that you can backup and restore your complete message board.
My classic board had 477K posts and the size on disk of all the forums was ~300 meg
When I backup from the UBBT.7 Control Panel / Database Tools, and backup all tables.. the result is relative puny; about 5.5 meg.
I would assume this is just the schemas and that the actual data is elsewhere? Do I have this right?
Last edited by luket; 02/07/2007 9:10 PM.
Member since November 2004 Gold Member since Feb 2008
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
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.
|
|
|
|
Joined: Nov 2004
Posts: 198
Member
|
Member
Joined: Nov 2004
Posts: 198 |
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
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
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
|
|
|
|
Joined: Nov 2004
Posts: 198
Member
|
Member
Joined: Nov 2004
Posts: 198 |
I must not be describing my problem clearly, sorry.
1. I did a backup using the Control Panel / Database tools / Backup all tables.
2. I have 488K posts and a file footprint in classic of 300 megabytes
3. The backup generated by UBB.T7 was like 51 .sql files with a total size of about 5 meg.
I am saying there is no way my 488K posts are represented in those 51 .sql files totaling 5 meg.
If my entire board should be represented in those 51 files, then there is a bug as described above.
Member since November 2004 Gold Member since Feb 2008
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
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.
Let me run a test for an example, brb
|
|
|
|
Joined: Nov 2004
Posts: 198
Member
|
Member
Joined: Nov 2004
Posts: 198 |
please *waits patiently*
Member since November 2004 Gold Member since Feb 2008
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
Ok, a good example is this, I have probably 1gb of stuff in my database, my backup of my database's size is 37mb.
Let me check just mymain site though
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
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.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
[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.
|
|
|
|
Joined: Nov 2004
Posts: 198
Member
|
Member
Joined: Nov 2004
Posts: 198 |
Ah, good to know...
By the way.. I *think* all of my forums were backed up to the same .sql file .. I watched as it changed sizes as though it was being overwritten by each forum.
Member since November 2004 Gold Member since Feb 2008
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
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. bad boy, bad bad boy
|
|
|
|
Joined: Nov 2004
Posts: 198
Member
|
Member
Joined: Nov 2004
Posts: 198 |
BTW, and FWIW; I'm running Windows Server 2003 and MySQL 4.1.12-nt.
Member since November 2004 Gold Member since Feb 2008
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
ahh so you won't have any of the nifty command line tools I mention, because you're not running a command line hehe
|
|
|
|
Joined: Nov 2004
Posts: 198
Member
|
Member
Joined: Nov 2004
Posts: 198 |
Yeah, MySQL ships ( even on Windows ) with a command shell, so we're all good there.
Member since November 2004 Gold Member since Feb 2008
|
|
|
|
Joined: Nov 2004
Posts: 198
Member
|
Member
Joined: Nov 2004
Posts: 198 |
Also, and more importantly... <--- this 'tongue sticking out' emote is all wrong! It should be like "Haha! neener neener!" .. but is instead more like "I feel ill"
Member since November 2004 Gold Member since Feb 2008
|
|
|
|
Joined: Nov 2004
Posts: 198
Member
|
Member
Joined: Nov 2004
Posts: 198 |
I still like this one!
Member since November 2004 Gold Member since Feb 2008
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
well, when I post most commands it's for the linux cli vs the MySQL cli ... Though I'm sure most of the things could probably be done through cmd im not entirely sure of the proper queries lol
|
|
|
|
Joined: Aug 2006
Posts: 1,649 Likes: 1
Pooh-Bah
|
Pooh-Bah
Joined: Aug 2006
Posts: 1,649 Likes: 1 |
GangsterBB.NET (Ver. 7.6.1.1) PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54 2007 Content Rulez Contest - Hon Mention UBB.classic 6.7.2 - RIP
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
I vote for inclusion of :/
|
|
|
1 members (Ruben),
1,277
guests, and
207
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|