News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Forum Maintnance- Restore a Backup

Started by fireandsalt, September 18, 2007, 10:40:55 AM

Previous topic - Next topic

fireandsalt

I looked for this feature request on here, but could not find a topic. It would be nice to have a Restore Backup function inside the Admin control panel. Maybe for version 2.0 of SMF.






karlbenson

I can't see a restore backup inside smf because it wouldn't work.

Just think about it.
SMF would require a working database with members/etc to run (which you don't have)  So you wouldn't be able to access the maintenance page to restore the backup.

Personally I use bigdump to restore my large database, but for others phpmyadmin would work.

fireandsalt

I would think this would be simple enough to code. I'm not a coder, so correct me if I'm wrong, but it should be as simple as taking a list of usernames, and populating those fields in the new database, and then creating all the forums (and child boards) and then populating those with the posts?

I can't understand how if I have a database of customer names and orders for a company, make a backup of this database, the database crashes so I re-install everything and then pull my database backup back out to restore.

What's the point of having a backup inside SMF with no restore? If it is too hard to do, why not delete the backup option and just post a help topic inside SMF's help to say basically "use cpanel" for your backup/restore needs....

But like I said, I'm no expert so this may be impossible like you said Karl.

karlbenson

An external script to upload it could work, Where you just point your browser to it. I believe Unknown posted a restore backup script. But I can't find a latest version of it.

It would be very possible to code a long script to restore a backup, no problem.

HOWEVER the difficulty is that SMF won't run without a fully functional database.  So you wouldn't be able to get to a page to restore your backup.

fireandsalt

Quote from: karlbenson on September 18, 2007, 11:04:23 AM
An external script to upload it could work, Where you just point your browser to it. I believe Unknown posted a restore backup script. But I can't find a latest version of it.

It would be very possible to code a long script to restore a backup, no problem.

HOWEVER the difficulty is that SMF won't run without a fully functional database.  So you wouldn't be able to get to a page to restore your backup.
OK. That would be cool if SimpleMachines had a script like you are talking about available as a tool to backup / restore their product's database. Would be an awesome thing to have available.  So far (thank God) I have not had the need to restore an SMF database, but I see a lot of help! threads posted which would seem to me to scream "maybe we should look into this" as a community of developers.

But, I'll get off my soapbox and stop ranting... SMF is by far the best product for producing a forum I've seen yet... including the "pay for use" ones...

rsw686

Restoring a backup is easy. I don't know why you would need an interface to do this. If your restoring to a clean extra of SMF then use the restore_settings.php file once you have restored the database. You can't restore from within SMF as it doesn't have any user data to work off of.

The database can be restored if you have SSH with mysql -p -D databasename < backup.sql Or you can use phpMyAdmin and import it from there. I have run into an issue and this is the backups created always have a mistake on the default value.


CREATE TABLE `smf_sessions` (
  session_id char(32) NOT NULL default '',
  last_update int(10) unsigned NOT NULL default '',
  data text NOT NULL default '',
  PRIMARY KEY (session_id)
) TYPE=MyISAM;


This line

  last_update int(10) unsigned NOT NULL default '',


Should be

  last_update int(10) unsigned NOT NULL default 0,


Since we are dealing with int values you can't have a string value.

The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

metallica48423

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

babjusi

Quote from: metallica48423 on September 19, 2007, 03:56:58 AM
create_backup.php/restore_backup.php

That link contains the latest versions of those two scripts.


These tools are very very useful. I was wondering why aren''t they included at the download section, under ''tools''? In that way they are bound to be found quicker and much easier than where they actually are. Is there a reason as to why they aren''t included yet?

karlbenson

The reason I didnt post them is because that was posted in 2004.

I agree I think they should be on the tools download section.

fireandsalt

Thank you one and all for your posts. Very helpful.  :D

metallica48423

QuoteThe reason I didnt post them is because that was posted in 2004.

They still work ;)
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

karlbenson

No worries Metallica.

I'd just rather not direct to users to scripts that I'm unsure whether work or whether they are out of date. ;)

Like I said above, it would be nice if they were added more prominently, eg on the downloads > tools section

;)

metallica48423

they may be a little out of date -- i've not yet had problems using them.

i'm not sure they work with utf8 or not though (haven't tried)

There'd have to be some updates done to them before they went on the page though.  in either case i've already posted it up back in july for the team to discuss ;)
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

karlbenson

Well I guess it would need re-writing anyway for 2.0 ;)

babjusi

They worked fine with the 2.0 as well.

karlbenson


Advertisement: