When you install a modification (mod), you, being a good admin, will backup both your database and your forum. BEFORE YOU INSTALL ANY MOD!
Some admins, though, aren't as clever as you are.
So, they install a mod without backing-up, first.
Oh, dear. The forum's dead. I DON'T HAVE A BACKUP!!!
Well, relax. You MIGHT be lucky.
SMF, being the helpful system that it is, takes a backup, for you.
Trouble is, restoring this backup will only work for the very last mod that you installed.
(You CAN use it to restore older mods, by going through the files in reverse date order, to be honest, but that's a bit involved)
Anyway... How do we restore the backup?
Dead easy!
Using your FTP program, have a look in your forum's "Packages" directory.
In there, you'll find another directory named, you guessed it, "backups".
Now, let's assume, for the sake of this tutorial, that the last mod that you installed was "PM On Registration".
In the afore-mentioned "backups" directory, you'd need the file:
2010-01-26_before_PM_On_Registration_1-0-2.tar.gz
The numbers at the front of the filename are the date that the mod was installed, so they'll be different, for you.
Download that file to your desktop, or somewhere fairly empty of files and dearchive it.
It's a "gz" file.
When you dearchive it you'll be left with a "tar" file.
If you dearchive that, you'll find loads of files and directories.
Upload those files and directories to your forum, overwriting what's there, now. (It'll take a while).
When that's done, Voila! Your forum should be exactly as it was, before you installed the mod!
Next time, backup before installing mods, won't you? ;)
K@, I realized this too but unfortunately I have to note that the backups is limited in the sense that it backups ONLY the Sources folder and forum root files and not other folders in the forum.
If a mod is changing for example Themes folder like css files etc, it wont restore them at all. The corrupt installation that have changed anything in the *.template.php files in that folder will not be restored using those backups. This is mainly important to note since a line of code in the template file can also caused site error.
As you have said, be a good admin and do backup before installing any mods or even themes.
I hope that may be, the Themes folder especially, will also be backed up together automatically by SMF forum software in the future.
Actually the backup should have the Themes files. Not the images - no image, that would make it huge quite uselessly, but templates, css, languages, and scripts, yes.
It won't save custom themes, as far as I know.
If it did...
Say you had thirty themes, or so? (Some have even more)
That backups directory would be HUGE!
However, when you install a mod, it doesn't install to custom themes, anyway.
(Note that this is in the SMF v1.1.x forum's support board)
The backups directory *is* growing huge. :D
Please keep in mind that it only saves "text" files (i.e. php, css, js, etc), so compressing them will really save some space. - and it does compress them.
In fact, it *does* save them for custom themes as well, on 1.1.11 included. Though you're right, I'm not entirely certain they should on 1.1.x... Then again, nothing stops mod makers to make their mod install on any theme of their choice (and include those specific instructions into the mod's package - even though that mostly doesn't happen in practice :)), so I guess it makes sense after all.
Quote from: K@ on September 13, 2010, 03:51:36 AM
(Note that this is in the SMF v1.1.x forum's support board)
Aha! I just note that. But why SMF 2.0 RCx doesn't backup the default theme folder, I mean that simple css, default templates etc... Just a curious... ::)
It should do it, really. 2.0 RCx as well, I mean.
There is none, Norv. I really did restore several backups from Pakacges/backups folder. I even downloaded them to check but there is none.
And about the size. I notices that it back ups everything in Sources folder which is not necessary. A backup can be smaller if only it back ups only the file that have been changed and not others. It is like a restore point and not the whole forum site backup.
Well as it is written, it doesn't know for sure which changed. Of course it could, though the mod installer may execute PHP code which changes more files than the package declaration says it will. Of course it can be done either way, it's just not something we will do soon, I'm afraid.
About backups not having themes at all: maybe it doesn't find the themes directories for some reason. You may want to see in phpmyadmin the result of:
SELECT value
FROM smf_themes
WHERE id_member = 0 AND variable = "theme_dir";
(where "smf_" should be your smf prefix).
Package manager tries to backup those directories it gets from this query, as far as themes are concerned.
Damn this just saved my life. Thanks a lot for being so smart SMF :D
Glad we could help, Giiyom! :D
Quote from: Norv on September 13, 2010, 07:18:28 AM
Well as it is written, it doesn't know for sure which changed. Of course it could, though the mod installer may execute PHP code which changes more files than the package declaration says it will. Of course it can be done either way, it's just not something we will do soon, I'm afraid.
About backups not having themes at all: maybe it doesn't find the themes directories for some reason. You may want to see in phpmyadmin the result of:
SELECT value
FROM smf_themes
WHERE id_member = 0 AND variable = "theme_dir";
(where "smf_" should be your smf prefix).
Package manager tries to backup those directories it gets from this query, as far as themes are concerned.
Hmmm... So far all my newly created site also have the same behaviour. I have to manually backup my theme folder most of the time. I will test this further on a fresh SMF 2.0 RC3 test site and will update.
Thanks :)
You are genius. I got one problem 1 hour before and solve it by my own with the help of this tutorial. My problem was here: http://www.simplemachines.org/community/index.php?topic=402768.0
You are genius. Thank you very very much.
Quote from: Norv on September 13, 2010, 04:02:48 AM
The backups directory *is* growing huge. :D
That is true. If you have many mods installed, then it can be bigger than 200 MB.
IMHO you don't have to backup Packages/backup folder.
That directory CAN get hacked into.
So, I always back that up, along with everything else.
Actually, that's not totally true.
I back it up (TWICE), then delete the contents of it.
If I want to uninstall anything, or otherwise fart around, I can just upload it all back.
I tend to keep the same time-stamps on everything, too.
Dunno why. Just seems like the right thing to do. ;)
I tried to post earlier and it does not appear to be showing. My forum is down. I tried using the back up and that is erroring out too. This is from trying to add the mod Anti Spam Verification Question 1.02.
Your post have been split from this topic. This is a sticky topic and is not meant to ask for help or support. You'll find your post in a new topic here: http://www.simplemachines.org/community/index.php?topic=405933.0
must backup first.
YOU ARE GENIUS!!
If you are a guy, I'm sending you big xoxoxoxoxo and if you're a girl well, I'm still sending them LOL!
THANK U!!!!!!!!!!!!!
I thought my board was lost but u helped bring it back. YAY!!!!
WoOt!
Let's hope you learnt to backup, in the future, though, ay? ;)
I'm a guy, so feel free to xoxoxoxoxo me, all over the place! :)
Great Tutorial, only one thing lacking. Since it is talking about getting your forum re-established when broke by a mod, wouldn't be more complete if it had say a one sentence or phrase that tells you how to actually practically restore the whole thing than just tell you where to find the fie to restore?
Like after you find xxxx then do A and then B and then C for example?
I mean I am just saying I guess most people here might know how to do that but some might not.
What more information could there be in that description than there is already? Not everyone keeps those backups, not everyone has them enabled, and the backups are going to be very specific to every installation...
Quote from: Geofrey on February 18, 2011, 09:16:31 PM
Like after you find xxxx then do A and then B and then C for example?
If you read it, again, it does exactly that.
hey i want replace 1.xx.x to 2.xx.xx
i have members on my forum i dont want to lose any data after install
how can i do that pls any1 give me the proceure
Quote from: technicalworks on February 20, 2011, 01:49:18 AM
i have members on my forum i dont want to lose any data after install
how can i do that pls any1 give me the proceure
See Upgrading SMF (http://docs.simplemachines.org/index.php?board=3.0;sort=subject)
Thanks just saved my site much more to learn before pressing buttons LOL.
Quote from: James Main on February 20, 2011, 05:58:38 PM
Thanks just saved my site much more to learn before pressing buttons LOL.
Remember to backup, first, next time.:)
this may sound like a dumb question, but how do you dearchive it to see the files in the .tar?
Use a dearchiving program, such as Winzip, WinRar, etc.
Quote from: K@ on April 11, 2011, 08:22:59 AM
Use a dearchiving program, such as Winzip, WinRar, etc.
Perfect! Thanks!
(http://www.katzy.dsl.pipex.com/Smileys/c014.gif)
Thanks for sharing.
Because I didn't back up when I installed my SMF 1.13.
so as im new , and to help me undersdtand before we install mods we must back up first, and creates the file which is downloaded to pc, so when we restore can we just upload packages and leave it as the one file or do we have to uncompress it first, as im using smf 2.0 rc5.
also if my forum has a lot of pictures will this be lost in back up if something goes wrong as i see it doesnt save jpg which is inportant and could be a huge amount of memory.
thanks savy
Best thing you can do, savy, is have a good read around here:
http://wiki.simplemachines.org
Thanks k@ i was just thinking is there a manual i will have a read, pictures are inportant to me as im trying to build a forrum for local artists.
thanks
savy
O:)
i downloaded and dearchieve the 2011-04-28_before_customprofile3-20.tar
now there are two folders named "Source" and "themes" and four files named
1. index
2. SSI
3. ssi_examples
4. ssi_examples
now plz tell me in which folder or location on my forum or server i have to upload these files??
Thank you. ;D
Helped you out?
Wonderful!
I installed a mod, Anti bot mod, but i later deleted it mistakenly, without uninstalling it. now nobody can register. and each time i try to install a new mod for my site it doesn't work please i need your help am new to this. I have two problems please i need your help my fellow members.
please do not use this thread for support, if you need help please open a thread in the proper board.
okay, i just saw the files now, mine is Aeva Media.zip, does it mean i should extract it to become a folder, and in which folder should i upload the file into is it the backup folder
notjustok you have a thread already on your issue you should use it for support to get it resolved, as stated above this thread is not for support.
In fact, it *does* save them for custom themes as well, on 1.1.11 included. Though you're right, I'm not entirely certain they should on 1.1.x... Then again, nothing stops mod makers to make their mod install on any theme of their choice (and include those specific instructions into the mod's package - even though that mostly doesn't happen in practice ), so I guess it makes sense after all.
(http://www.makemoneymakemoney.net/huang4.jpg)
(http://www.makemoneymakemoney.net/huang2.jpg)
(http://www.makemoneymakemoney.net/huang3.jpg)
Thanks, it worked wonders for me
Glad to be of service. :)
Thanks!
Pleasure! :)
Phew.... Best feature ever!!
I guess my new forum doesn't like Aeva Media Gallery... >:(
One question... Now that I have restored sanity to my forum, should I uninstall or delete the broken mod? I'm a bit worried about messing things up again (although at least I have the pre-install back up now - thanks SMF!). Or should I just leave it in place, showing as active?
It'll still be showing in your "installed.list" file, which is inside "Packages",
If you remove the line that show AEVA, it should vanish. Or, just replace it with the one in your backup.
When you say that's it's still active, what do you mean? The button's still showing?
When I go into Package Manager it still shows Aeva Media and I have the option to uninstall, list files, and delete. What I think I should do is run the uninstall (which fails the tests for a bunch of files) and then delete. Just wanted to double check before I mess things up again. I could just leave running as is, but would like to clean up my mess.
I had a look at that install.list file but it doesn't have much in there, just: 1326790205
if you are running 2.0.* use the attached script to mark the mod as uninstalled.
hmmm... when I tried to run that page I got the following error...
Fatal error: Call to undefined function template_ad_position() in /home/dgo/public_html/phoenix/Sources/Load.php(2151) : eval()'d code on line 187
that file has nothing to do with the ad template so no idea why you would get that error. disable template eval and see what error you do get.
Admin -> Server Settings -> Disable evaluation of templates
Then post any new error messages without eval in them
Same error... Strange...
then you should post about that in the ad mods support thread.
Quote from: ArrayInteractive on January 17, 2012, 02:15:42 PMWhat I think I should do is run the uninstall (which fails the tests for a bunch of files) and then delete.
If that was my forum, I'd back
everything up, cross my fingers, and do exactly that. (http://www.katzy.dsl.pipex.com/Smileys/c018.gif)
Good call, what I should have done in the first place. All good now... (except for my strange PM issue)
Thanks.
(http://www.katzy.dsl.pipex.com/Smileys/c014.gif)
Nine times out of ten, you think "Fook it. I've backed up, so I'm gonna go for it" and it works.
When you do the same and don't backup, you can almost guarantee it'll fook everything up.
I believe it's known as "Finagle's law (http://en.wiktionary.org/wiki/Finagle's_law)". ;)
;D
Truth be told I've become a little too comfortable with the ease of working with smf packages, things usually work so awesomely that it never occurred to me that I should backup before I try X. Despite the numerous warnings everywhere :o
/me burns his sig into the subconchuss bits of ArrayInteractive's (What a silly name!) psyche... (http://www.katzy.dsl.pipex.com/Smileys/evilgrin.gif)
better is removing all the files and copy it new no ? cuz then you will keep the stucky files there . when you just copy and override it
/me doesn't understand that last post...
If you're saying that overwriting all the files with new ones would work, you're right. Problem is, it'll also destroy all of your other mods, too.
Not a good idea, at all. ;)
What if uploading the backup files wont help? ???
Create a topic in the support boards?
sorry guys I'm a total noob: where and what should I backup? Is there a guide for noobs? :-[
Thank you!
http://wiki.simplemachines.org/smf/Backup
(http://www.katzy.dsl.pipex.com/Smileys/c007.gif)
Great SMF has this feature, and i feel secure after i came to know about this.
I have been testing a bunch of MODs in one of my test forum. I install them, uninstall them, again install and again uninstall and so on. So the backup files kept increasing in /Packages/backups.
Can i delete the earlier ones?
Yep. It might be an idea to keep 'em on your hard disk, though, in case you ever need 'em.
If you KNOW that you're never gonna need 'em, dump 'em. :)
Actually I broke my forum while I uninstalled a mod :D
You're special. :)
Quote from: Cyberhost on September 21, 2013, 02:43:11 PM
Actually I broke my forum while I uninstalled a mod :D
Same thing happened to me. I am pretty new at this...my first forum. Now when I type in the address nothing shows up i.e. white page.
I was able to fix the forum by following the instructions.
It worked for me too!
Yay!
Will this procedure solve a damage database issue?
I have database tables that got emptied by accident and my forums are very broken.
I do have a SMF database_complete backup but can't get it restored.
Will this procedure set it back to the latest mod install date?
No... This is just for *files* modified by MOD installation.
Check with your host, maybe they have automated daily backups ;)
They don't have a backup as I had exceeded the max # of inodes (whic I fixed).
All I have then is older complete backup database backup (from the Admin panel) to work with. But I can't find reliable information on how to restore from that file.
From SMF's admin panel or from cPanel?
Quote from: klra on May 16, 2014, 10:58:12 PM
They don't have a backup as I had exceeded the max # of inodes (whic I fixed).
All I have then is older complete backup database backup (from the Admin panel) to work with. But I can't find reliable information on how to restore from that file.
this user started their own thread http://www.simplemachines.org/community/index.php?topic=522603.0 please keep replies to that thread to keep confusion to a minimum.
Will this recover database info as well.? Thanks.
Not in a million years.