Restore from downloaded backup

Started by sck, April 23, 2012, 10:22:31 AM

Previous topic - Next topic

sck

I have a forum that has had a bunch post deleted.  I have a downloaded backup from the Admin screen.  How do I restore from the backup?

Robert.

Backups from the admin panel are 99% of the time corrupt. But if it's not corrupt, just download it, go to phpmyadmin and import the sql file. ;) Perhaps this might help you out: assets.webassist.com/how-tos/importing_sql.pdf

sck

That is not what I wanted to hear!!  I was thinking I was doing good making the backups!!  Having the host do it is not cheap.

MrPhil

Just to clarify, it's the SMF Admin backups which are usually bad (corrupted or incomplete). Unfortunately, the developers have no interest in fixing the backup function (or removing it). You need to use your host's backup (see phpMyAdmin or whatever they offer for backup and restore functions). Normally there is no charge for doing this.

Any decent host should have utilities (such as phpMyAdmin) to allow you to restore a backed up database. SMF cannot restore its database -- you need to use phpMyAdmin or the equivalent. Unless you have a huge database, in which case phpMyAdmin may time out, you should be able to handle backups and restores yourself. If your database is too big, talk to your host about installing various database utilities that can handle huge backups and restores, or just break up the task into smaller pieces (as small as one table at a time).

sck

#4
The issue is the host only shows one backup available and it is not old enough.  They can pull a diferent file but that is going to cost. 

It would be nice if SMF would at least let us know that it does not work.  I thought I was doing good making backups.  If I had known this, I would have been making backups on the host CP.   >:( 


MrPhil

Well, there's no harm in making a second database, restoring your backup, and seeing if it works. If it restores without error, point your forum to it and see if all the data seems to be there. Odds are it won't work, but you can at least fix restore errors (formatting of the .sql file) and get to the point of seeing if all the data is there.

Yes, it would be nice if SMF would fix (or remove) such broken features. Apparently, maintenance is very low on the developers' priority list, while kewl new feechers is hot. You have every right to be upset with them.

Sir Osis of Liver

Quote from: MrPhil on April 23, 2012, 12:57:33 PM
Yes, it would be nice if SMF would fix (or remove) such broken features.

Barring that, it would be helpful if someone from support staff would post a sticky on the 1.x and 2.x support boards advising users of the admin backup problem, and explaining other backup options.  This is a frequent topic, and somewhat critical in cases such as this thread.

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

                                     - R. Waters

kat

Quote from: MrPhil on April 23, 2012, 12:57:33 PMYes, it would be nice if SMF would fix (or remove) such broken features.

I've moaned and moaned and moaned.

It's been ignored and ignored and ignored.

It IS in the wiki, at least, since I bloody made sure it was.

No point in a sticky, coz everyone ignores them. :(

Guess who's gonna try, yet again...?

Edit: http://www.simplemachines.org/community/index.php?topic=474901.msg3320458#msg3320458

Antechinus

Quote from: 医生唱片骑师 on April 23, 2012, 10:26:52 AM
Backups from the admin panel are 99% of the time corrupt.
It always worked perfectly on my box, up until the backups simply got too big for php to handle. What reliable stats do you have to support your claim that 99% of the time it's corrupt?

Colin

Haven't had an issue with any of my clients, but then again I have heard many who have.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Norv

Quote from: sck on April 23, 2012, 11:33:25 AM
It would be nice if SMF would at least let us know that it does not work.  I thought I was doing good making backups.  If I had known this, I would have been making backups on the host CP.   >:( 

The SMF backup tool works in many cases. There are server restrictions and configurations, under which it may fail, and it will fail. As a general idea: it would be good to make sure every time that the file size is the one you'd expect (that is, continuously growing, compared to the last one). A suddenly small or empty file would be, obviously, a failure, a sign that PHP might have reached its limits and SMF script wasn't able to finish normally.

I think there still are, here, problems we absolutely need to address. I am aware there are cases of failures, in particular when the database grows and PHP may reach its configured limits, causing scripts (including SMF's script) to fail.

However, in the case of your backup, I don't see any clue that it may have reached such cases. How big is your file? If you open it in an editor, can you please tell how does it end? (the last lines)

To restore it, please make another database, and "import" the file through PHPMyAdmin, if your host offers it. It would allow you to know whether the file is at least well formed. Please, feel free to let us know how it goes.

As a general idea, however: SMF backup tool is NOT as good as specialized backup tools, and it may indeed fail, depending on many factors. It is provided for small forums, as a first-assistance tool, but as your forum grows, it would be recommended to look into using specialized tools.

SMF should provide this information fully through the admin interface. We're looking into other options, too, actually, including removing it from SMF and pointing out admins to specialized tools, instead, both made by us and third-party.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: