News:

Wondering if this will always be free?  See why free is better.

Main Menu

Restore Database from Backup

Started by nomenclator, November 05, 2013, 05:11:39 PM

Previous topic - Next topic

nomenclator

Hmm. The online manual has instructions for how to use the message board administration feature of backing up the database. I have only a few messages so far, and the sql.gz file that I downloaded to my local computer hard drive was only 30 kb. The single *.sql file inside - I opened it up in a text reader and saw that it was a text file. At any rate, the online manual page that described how to back up, was silent about how to restore! And there is no "restore" choice in the smf administration section called "forum maintenance" where I found the "backup" button.

So I then searched the forum for instructions on how to restore - and I found info about how to restore through cPanel, but not about how to restore thru the smf program. There I found link, http://wiki.simplemachines.org/smf/Backup_-_How_do_I_restore_the_database_data but it doesn't mention using the smf pgm to do a restore, or how to restore files some other way, that were backed up with the pgm. Very frustrating. It says backing up is important and neglects to mention that restoring is also important. Lastly, it mentions simply using ftp to download files as a way to backup - but it doesn't say which files in which folders to download. Darned if I can find them anywhere.

I did a backup using cpanel, which has a place where one can select and backup MySQL database files. Compared the sql.gz file that was made using cpanel, with the one made using smf admin, opened up both in notepad, and they looked very different.

Chalky

There is no way to restore the database from within SMF, that's why you can't find it  ;)  In fact, after much controversy I do believe the backup facility has been removed altogether from SMF 2.1.  If you have access to phpmyadmin or the backup facility within cPanel, then that's really what you should be using to back up and restore your database.  The SMF database backup facility has been known to be a little unreliable at times, especially with larger forums.

As for which folders and files to back up, the answer is all of them  ;)  When you connect to your site using FTP, your forum files will be in a folder that looks like public_html or home if installed in the root, or within their own folder, if that's how you installed it.  You will see attachments, avatars, Sources, Themes, etc, and a bunch of files such as Settings.php and Settings_bak.php.  Copy everything you see there and its contents to your computer in order to have a complete backup of your forum appearance, functionality and mods, attachments and avatars.  Depending on your forum activity you may wish to backup the attachments and avatars folders more frequently than the other files.


nomenclator

ChalkCat ok i guess i'm going to use cpanel.

Re ftp, I know where I installed the program when i expanded the tar file that i uploaded to the server, and I see some of the program files there that I remember turning up there when i expanded the tar file, and possibly there are some configuration files, and more files got added when I added modification pgms via the main program, but I don't know which file are which, or know which file is the data file for the mySQL database having all the messages and registered users and all that stuff.

Chalky

The database is separate from the files. You won't find any of your forum posts with FTP. Have a read of the page MrPhil linked above for more clarification.

nomenclator

#5
Quote from: ChalkCat on November 05, 2013, 08:15:54 PM
The database is separate from the files. You won't find any of your forum posts with FTP. Have a read of the page MrPhil linked above for more clarification.

I put a link to page that you said MrPhil linked to, in my starting post. I didn't find the answer to my question there - how to backup-restore the forum data using ftp - which the page says you can do but doesn't tell you which files to download-upload in order to do it.

I'm having trouble using this particular forum because it is very hard to see the verifcation letters needed to post, because they have lines through them, covering them, and clicking on "listen to the letters" - the server takes a very long time to respond, and when it finally does respond, it is often staticky, and I'm not always sure if I'm hearing a T or a D, a V or B, etc. The verif letters on version 2.04 that I have on my server are easier to see than the one here. Every time I try to post a message I have to do it about 8 times before I guess the letters correctly.

Kindred

you can not restore a backup to the DATABASE via FTP...  it doesn't work that way.
You need to go into phpmyadmin and IMPORT the database backup file (should be a .SQL or .TAR.GZ file)


FILES ARE DIFFERENT FROM DATABASE!

The DATABASE has all of your forum CONTENT (posts, users, etc)
the FILES control how that content gets DISPLAYED.
You need both...   but the FILES are uploaded from FTP or the file manager and the DATABASE is uploaded through the import function in phpmyadmin (or command line sql import, if you have command line access)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MrPhil

If your backup (.sql or .sql.gz or whatever) is sitting on your PC, you'll have to first FTP it up to your server, and then IMPORT it into phpMyAdmin. Some versions of phpMyAdmin might also do the FTP for you (IMPORT directly from your PC), so check first if you want to.

Kindred

I have always done a direct import in phpmyadmin - direct from my computer to DB server
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: