Advertisement:

Author Topic: Restore from downloaded backup  (Read 3472 times)

Offline sck

  • Semi-Newbie
  • *
  • Posts: 89
Restore from downloaded backup
« on: April 23, 2012, 10:22:31 AM »
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?

Offline Robert.

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,074
  • Gender: Male
    • nedroden on GitHub
Re: Restore from downloaded backup
« Reply #1 on: April 23, 2012, 10:26:52 AM »
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
Software Engineering student
DraiWiki | Project Alpha

Offline sck

  • Semi-Newbie
  • *
  • Posts: 89
Re: Restore from downloaded backup
« Reply #2 on: April 23, 2012, 10:34:42 AM »
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

  • Guest
Re: Restore from downloaded backup
« Reply #3 on: April 23, 2012, 10:48:15 AM »
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).

Offline sck

  • Semi-Newbie
  • *
  • Posts: 89
Re: Restore from downloaded backup
« Reply #4 on: April 23, 2012, 11:33:25 AM »
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.   >:( 

« Last Edit: April 23, 2012, 12:47:49 PM by sck »

MrPhil

  • Guest
Re: Restore from downloaded backup
« Reply #5 on: April 23, 2012, 12:57:33 PM »
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.

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,242
  • Hoarding Budweiser in NY
Re: Restore from downloaded backup
« Reply #6 on: April 23, 2012, 01:58:56 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.


kat

  • Guest
Re: Restore from downloaded backup
« Reply #7 on: April 23, 2012, 02:28:04 PM »
Yes, 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

Offline Antechinus

  • SMF Friend
  • SMF Master
  • *
  • Posts: 25,303
  • Master of BBC Abuse
Re: Restore from downloaded backup
« Reply #8 on: April 26, 2012, 05:12:44 PM »
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?

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,892
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Restore from downloaded backup
« Reply #9 on: April 26, 2012, 06:50:10 PM »
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

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,313
  • Blue Wolf
Re: Restore from downloaded backup
« Reply #10 on: April 27, 2012, 02:38:38 PM »
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