Advertisement:

Author Topic: SMF admin panel backup is crap! Can we have a patch release to remove it please?  (Read 32970 times)

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Thank you very much for looking into it, Ema. Perhaps having it available for testing would be even better, when possible, for people to take it for a spin.
I will, I will, but remember my award, I would be sure I didn't put something strange in it. :P


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

kat

  • Guest
Boy, I sure started something, with this, didn't I?

MrPhil

  • Guest
@N.N., there are at least two failure categories for SMF backup (as currently implemented). One is catastrophic (partial backup due to some resource limitation, with no warning to the user). If the user is relying on that backup to restore their system, they're screwed. Might as well start over from scratch with their forum. The other is annoying and potentially much work to fix (250*N record problem, certain hex strings needing quotes, wrong default for an integer, reserved keywords as field names, and possibly others). These, at least, can be fixed by manually editing the .sql file, but it can be tricky work.

Are 100% of backups bad? No, but a distressingly high percentage are. Should the first thing a user asking how to restore their backup be told is that it's probably bad? Perhaps not, but they should be told there's a non-trivial chance it's no good.

MrPhil

  • Guest
Boy, I sure started something, with this, didn't I?

Bad kitty! Hold out your paw so I can slap it!

Hey, sheath those claws!!!

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,452

kat

  • Guest
Bad kitty! Hold out your paw so I can slap it!

Hey, sheath those claws!!!


Offline Angelina Belle

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,586
I can understand  that the incomplete backup problem was missed in beta testing.

It has been mentioned before, in support issues for some time.

It seems that we have had a failure to communicate -- somewhere between support team and dev team, the severity of these issues was lost, and the fix was never made.

I thought SMF 1.0.x  had already reached EOL? http://www.simplemachines.org/community/index.php?topic=472913.0
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Offline Burridge

  • Jr. Member
  • **
  • Posts: 132
  • Gender: Male
    • Burridge on GitHub
    • @burridgedan on Twitter
I thought SMF 1.0.x  had already reached EOL? http://www.simplemachines.org/community/index.php?topic=472913.0
According to that link, that's just the announcement - EOL doesn't happen until December 31st this year. If that is what you meant, then I misinterpreted your comment, and feel free to ignore mine...

EDIT: Lol, got a warning telling me the title of the topic was too long, haha.

Offline user1234

  • Charter Member
  • Jr. Member
  • *
  • Posts: 261
I agree, it costed me my forum once because I had no idea that admin panel backups didn't work. So, I'd say yes :)

It cost me mine too, as Mr. Phil will attest that it put to my knees in tears (Hey Mr. Phil!) and as K@ will surely attest, as he was bearing with me throughout the adventure. I was a couple weeks trying to get it back on line, along with blowing through 4 different hosts, while being dogged by DDoS attacks at every turn. Funny thing was, after all that, all I really needed to do was to rename the database!

I back mine up every couple of days or sooner, and then I test it in another website that I have, that I uploaded SMF onto purely for test purposes (that site doesn't otherwise need a forum).
I "import" the db, and then after I get the OK, I physically look at the forum online to make sure the database looks just like it did on it's own site, then I "select all" tables and click "drop". I do it a couple times a month but I had a scare today, and got that sinking feeling again, that may encourage me to test it even weekly.

And as far as this thread subject goes, then I guess I just have to abandon that handy in-forum database backup. It worked on every backup this month except the one I tried today, for which I repeatedly got an instant "done" message but the backup is 0 kb.
« Last Edit: April 30, 2012, 05:41:54 PM by user1234 »

Offline Angelina Belle

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,586
 Oh well, when you are as old as I am, December 31st feels like tomorrow   :-[   
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

kat

  • Guest

MrPhil

  • Guest
pffft!

Kids, eh? ;)

Dad-gum kiddies! Let 'em start out the way I did, with FORTRAN on punch cards! That'll learn 'em! And another thing -- I had to write a whole database in binary, but we couldn't afford '0's in those days, and...
[nurse] Come on, Grandpa. It's time for your medications!

kat

  • Guest
Huh! FORTRAN hadn't been invented!

We used slates and chisels!

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

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,614
  • Gender: Male
  • I am a ninja!
    • adishpatel on Facebook
    • https://www.linkedin.com/in/adishpatel on LinkedIn
How about we do this?
- Create an algorithm which could give the users a good idea of the backup size and is dispalyed on the forum backup page.
- Instead of letting users download the backup, place the backup in a default directory /backup or give them an option to rename it to something else through their maintenance area? (The /backup directory can not be viewable from the browser by default and a fix permission option will be a plus.)

How does this help?
- If the size is not near to what we suggest, then the backup is corrupted for sure and user can look into an alternative.
- Reduces chances of a bad copy being downloaded due to slow internet, browser crashing etc.. on the user side or module crash/restart from the host side.

What say?

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,452
.... FORTRAN on punch cards!

Been there, done that. 


Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,843
  • Master of BBC Abuse
Me too. Don't wanna do it again either.

MrPhil

  • Guest
What say?

Hmm. Will all of the databases tell us how large variable character fields are, so we can add them up? The big problem will be that unless we can come up with the exact expected size, users will deluge support with "My backup is 3 bytes smaller than what it should be! What went wrong?" A rough estimate is no good -- it must be exact.

What might be just as effective is to do a query on each table to count the number of records, and make sure after spitting out the backup that we output that many records. Naturally, the forum would be in maintenance mode throughout the backup. I think it would be sufficient to make sure we output all the records (i.e., I don't expect to see partial records). If it quits in the middle, couldn't we detect that, too? Maybe we should just look at the end of the .sql file to see if there is anything that looks like an error message (e.g., due to timeout) and report failure.

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
@FLAMER: what you are describing is more or less what you can find in the snap I posted few minutes ago: there are warnings if the backup is at risk, there are instructions (well not yet :P) on what's the best option and if the database is over a certain size the button is disabled if the forum is not in maintenance mode.


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

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

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,614
  • Gender: Male
  • I am a ninja!
    • adishpatel on Facebook
    • https://www.linkedin.com/in/adishpatel on LinkedIn
MrPhil,
A perfect size may just increase the server resource usage from how I see it. May be, under Forum Maintenance, we can give them a option of "Calculate database size now" and then they can correlate it with that, or a button on the backup page. Having it automatically calculated every time they backup the area might not be a good idea unless you think it wont be very resource intense.

Yep, looking at the last few lines will give us the answers straight away, but that may need the use of vi or nano command on the server side which would be something that is disabled as a user. Not sure, how this will work otherwise.

emanuele,
Putting the forum into maintenance mode seems to be a good idea when the forum is over a certain size. Annd... I am a little lost in this topic lol. Which post are you talking about? :P

kat

  • Guest
I'm no coder, as you all well-know. So, this suggestion could be total bollox and be laughable.

Thinking about archivers and the like, though, is it possible to do the equivalent of a Cyclic redundancy check? Maybe a checksum?