Backup Database

Started by loose-cannon, May 11, 2015, 06:52:26 PM

Previous topic - Next topic

loose-cannon

Im trying to be pro-active and learn the process in the event I have to restore the database from a backup. I used the cpanel to create a full backup. It gave me a tar.gz file... do I import this entire file in myadminphp, or do I need to extract something from it first?  Sorry if this seems like another dumb question from a newb.  :-X


loose-cannon

oops.

I have a test installation of smf 2.0.1 on a subdomain for testing. 

Kindred

You used which cpanel to create the backup?  Your host site cpanel or the smf administrative section?

If the host cpanel,  then you may have to extract the sql file to be able to restore it in phpmyadmin...  did you read the wiki/faq on backups?
Сл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."

loose-cannon

Quote from: Kindred on May 11, 2015, 07:00:26 PM
You used which cpanel to create the backup?  Your host site cpanel or the smf administrative section?

If the host cpanel,  then you may have to extract the sql file to be able to restore it in phpmyadmin...  did you read the wiki/faq on backups?

I used my host backup. I read the faq here, but Im confused as to what file Im supposed to use. Cant seem to be able to unzip the tar.gz on my pc. Is there a program used to unzip theses files?

loose-cannon

Ok..  I used 7zip and extracted all files.  Which sql file do I use?  looks like there are a few...

Kindred

Whichever one matches your SMF database name
Сл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."

loose-cannon

Quote from: Kindred on May 11, 2015, 07:29:04 PM
Whichever one matches your SMF database name

I imported it and the test forum is more/less complete, but no posts are showing.,.. bunch of errors.  Im basically trying to duplicate my site, is there more files I need to replace?

Kindred

Quote from: Kindred on May 11, 2015, 07:00:26 PM
You used which cpanel to create the backup?  Your host site cpanel or the smf administrative section?

What are the errors? You imported it where? To the same location/URL?
Сл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."

Sir Osis of Liver

If your database is not too large, you can export it as .sql with phpmyadmin.  IIRC, it can also be zipped in at least one format that phpmyadmin can import directly.  Empty your logs before you dump the db.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

loose-cannon

Ok.. Think I got it. looks good.   I do have another issue though.  :-[   I decided to uninstall the Trader System and after I did so, the "Trade Count: (+1)" is still being displayed under the members name and above their avatar in posts.   :o  No Idea what went on there.

Sir Osis of Liver

Did package manager show any errors when you uninstalled?   Does it happen in default theme?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

loose-cannon

No errors on uninstall.   I re-installed it and now the trader count is displayed TWICE.   Shows on all themes.

This is not on the test theme...   And when its still there after uninstall, when you click on the trade count # it just goes to the index page.  Very strange. 

Sir Osis of Liver

The mod did not uninstall completely.  You seem to have two broken installs in the affected files.  If it's the last mod you installed, you can find the package manager backup in /Packages/backups/.  Download, extract, upload and it will restore your forum to where it was prior to the mod install.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

loose-cannon

I extracted the backup tar.gz but now I have a bunch of files and none of them are a zip. 


Sir Osis of Liver

The .tar.gz is the zip.  The files it contains are the forum files which package manager backed up before installing the mod.  If you upload them to your forum, they'll replace the files that were edited by the mod.  Bear in mind that any other changes that were made to the files after the mod was installed (other mods, manual edits) will be undone.

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

                                     - R. Waters

loose-cannon

Keeps telling me the file already exists on the server.

Sir Osis of Liver

Are you using ftp or host file manager to upload files?  Yes, the files do exist on server.  The object here is to replace the damaged files on server with (hopefully) undamaged files from the pm backup.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

loose-cannon

Host manager.    Im hopless.  :P

If I need to use file zilla... where do I put it?

Sir Osis of Liver

If you've unzipped the backup you'll see the same folders/files that you see in the forum root on the server.  In FileZilla, the left pane (your computer) looks like the right pane (server).  You select all the folders/files in right pane, and upload them to server so they overwrite the corresponding server files.  Make a backup before you start, d/l all folders/files to a backup directory on your computer in case things get sideways.  Also a good idea to set FileZilla default transfer type (Transfer -> Transfer type) to binary, else it will bork your attachments.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

loose-cannon

Done.

Strange part is...  The trader is showing as not installed, but yet its sure as heck showing in the forum. Its even working now as it was before.   :o

Its like its now a perm part of the forum.   :P

Basically its the same only its actually working again.

Advertisement: