SMF admin panel backup is crap! Can we have a patch release to remove it please?

Started by kat, April 23, 2012, 02:37:18 PM

Previous topic - Next topic

Bigguy

Is there no way to at least hook into cpanels backup feature and use it through SMF. ???

mashby

Interesting. I had posted some questions before I did an upgrade of a site from 1.1.x to 2.0.2 and I had written that I was going to backup the database using the SMF admin panel. I was advised to use cPanel instead and not to rely on the SMF backup. So, which is it?

Realistically speaking, using cPanel is the most effective way to do backups, right? What tool does the administrators of this site use to do a backup?
Always be a little kinder than necessary.
- James M. Barrie

busterone

I use SSH myself, but I realize that a large portion of new users may not have command line access, nor know how to do it if they do have access. It is by far the best export and import method in my opinion though.
My experience with SMF's admin backup was shoddy from the start. I tried it for S@G on several hosts and had the same result each time. Anytime a DB had grown beyond around 15 mb native, the backup failed. 

Bigguy

@ Mashby: As far as I know cpanel is the most reliable backup you can get.

I need to learn SSH for sure. That's one of the next things I will do when I get time.

青山 素子

Quote from: mashby on April 25, 2012, 09:28:35 PM
I was advised to use cPanel instead and not to rely on the SMF backup. So, which is it?

Realistically speaking, using cPanel is the most effective way to do backups, right? What tool does the administrators of this site use to do a backup?

In order of preference:

  • Direct on server with mysqldump (I usually run "mysqldump --opt" for maximum goodness)
  • Hoster-provided tool (via cPanel, Plesk, whatever)
  • SMF-provided tool
Using mysqldump directly avoids all the potential problems from a web-based solution including timeouts and memory limits. It's also usually lighter on resource usage and faster. If that isn't available, using the hoster-provided tool is the next best as these are sometimes configured so as to avoid some of the limits imposed on customer sites. The last resort is using the SMF tool which works okay, but is bound by any restrictions the host imposes on customer sites.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

mashby

So, to fix the SMF part, which as I understand it is third in order of effectiveness (thanks for the analysis Motoko!), the DEVs would have to make it at least as good as cPanel, or ideally, as good as mysqldump. I guess my question would be why waste the time to do that when there are better, existing tools? I get where Flamer is going with the concern regarding free hosts. In that case, though, don't you get what you paid for? If it's an easy fix, great, but this issue seems to have been lingering for quite some time which makes me believe it's not all that easy, or something along those lines. I'm still wondering what the administrators of this site use to do a backup?
Always be a little kinder than necessary.
- James M. Barrie

Sir Osis of Liver


Can the problem be addressed from the other end?  Is there any way the backup utility can be made smart enough to recognize server errors, or compare the backup with the db, and display an error if backup fails?

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters



青山 素子

Quote from: mashby on April 25, 2012, 10:47:05 PM
I guess my question would be why waste the time to do that when there are better, existing tools? I get where Flamer is going with the concern regarding free hosts. In that case, though, don't you get what you paid for? If it's an easy fix, great, but this issue seems to have been lingering for quite some time which makes me believe it's not all that easy, or something along those lines.

Perhaps move this functionality to a modification?


Quote from: mashby on April 25, 2012, 10:47:05 PM
I'm still wondering what the administrators of this site use to do a backup?

As this site is on its own servers, mysqldump, last I knew.


Quote from: Krash. on April 25, 2012, 10:54:19 PM
Can the problem be addressed from the other end?  Is there any way the backup utility can be made smart enough to recognize server errors, or compare the backup with the db, and display an error if backup fails?

Possibly, some of this could be done. Also, segmenting the backup could be helpful. Comparing wouldn't help much as it would basically require re-reading the file into some temporary table and then comparing, which would be a real pain. I don't think the effort needed would be worth the result.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Angelina Belle

I've had a problem with the internal backup, and I have a small site with not very many posts.

I agree that Half a backup is NOT BETTER than no backup at all.

[Unknown]'s old backup and restore scripts are reliable for me.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Adish - (F.L.A.M.E.R)

Last I knew, cPanel runs on perl and that is why the PHP limitations don't tend to cause any issues. SMF could possibly do that, but I don't know if perl is compatible with anything except CentOS and ubuntu. If it is, well and good. If it is not, we hit another road block. :P

Angelina Belle

[unknown]'s backup and restore scripts are reliable for me, and they are written in php.  Are they reliable for larger forums?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Adish - (F.L.A.M.E.R)

Not sure, I could try and test it out. I don't even know where that topic is. Would you please be kind enough to point me to that topic? :)

Angelina Belle

Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

MrPhil

QuotePeople can simply examine the backup to see if it's good...
Most people wouldn't know if a backup was actually any good or not, just by looking at it. Even doing a test restore isn't foolproof, if the backup quit part way through while leaving a valid .sql file. SMF's backups can have some very subtle problems, including

  • Hex strings are unquoted, leaving cases like 1234e567 which MySQL tries to read in as a floating point number.
  • Sometimes integer fields get a '' empty string default.
  • The backup can end in the middle due to timeouts, and the poor user is none the wiser.
  • SMF backs up in chunks of 250 records per INSERT. If there are 250*N records, you end up with a superfluous INSERT with no data.
  • Field names should be within ` because sometimes there are reserved keywords used as field names.

These are only the ones I know about. Some of them are fixed in my sig > Fixes. All of them can be fixed after the fact by editing the .sql file, except for loss of data due to timeouts, but it's delicate and time-consuming work (I know -- I've fixed several large backups for people).

QuoteSomething is usually better than nothing...
Absolutely not. A backup should be complete and reliable, or you shouldn't produce one. People are relying on this backup to protect them, and it looks very bad when it's no good.

QuoteNot all hosts offer database backup and restore functions...
That is a problem. Question: if there is no way to restore a database, what is a user on such as host supposed to do with their SMF backup? Perhaps the solution would be to offer as a separate download utility (i.e., not built into SMF, to discourage people from using it) a simple repaired backup and restore utility. It could set the forum into maintenance mode, and run in smallish chunks to keep from getting timeouts. What say?

青山 素子

Quote from: (F.L.A.M.E.R) on April 26, 2012, 10:58:50 AM
Last I knew, cPanel runs on perl and that is why the PHP limitations don't tend to cause any issues.

Plesk uses PHP and doesn't have issues either (at least with backups). The real problem is the limitations on client websites.


Quote from: (F.L.A.M.E.R) on April 26, 2012, 10:58:50 AM
SMF could possibly do that, but I don't know if perl is compatible with anything except CentOS and ubuntu. If it is, well and good. If it is not, we hit another road block. :P

Perl runs on nearly everything, including Windows, Solaris, AIX, HP-UX, and every flavor of Linux and BSD UNIX. You'll still run into the issue that not all hosts allow perl scripts, and you'll still be dealing with any timeouts the host has on client sites.

The best solution is to pull out the integrated backup tool, turn it into a supported modification, and improve that code as best as can be done.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Angelina Belle

Mr.Phil -- doesn't unknown's create_backup and restore_backup do that? Do the job in chunks, to avoid timeouts?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

MrPhil

If it's been repaired (if needed) to avoid the problems I listed, it might just fit the ticket. Should it be included as a standalone utility in SMF (not directly called by SMF), or just offered for download? That is, do we want to encourage users to back up/restore using phpMyAdmin wherever possible, and only use this utility as a last resort? Should such a utility be optimized in any way for SMF (what ways)? Should it only back up/restore {smf_prefix} tables, in case the user has only one shared database, or can it be a general purpose utility?

Advertisement: