News:

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

Main Menu

how to make back up database, help

Started by elguapo, January 06, 2011, 10:46:52 AM

Previous topic - Next topic

elguapo

hello, how can we make back ups on smf 2.0 rc4? do we just download the database on admin panel? and how do we restore messed forum with the downloaded database on the admin panel? appreciate any help. thanks.


KensonPlays

*addition: what masterd said as well*
How do I backup my database?

Download DB file from admin yes. To "fix" an issue with the forum, whether it be a code error or display error, you can just upload a large upgrade package MINUS: Upgrade.php (it's "upgrade" files) and "Settings.php" and "Settings_bak.php" Leave those, do not remove those.

To fix: Go to and upload those files. Then backup your previous database files, remove tables, and upload the .sql file you downloaded and run it in PHPMYADMIN.

Then make sure you have the newer files uploaded, backed up the old database, then delete and run the .sql file (copy-paste as a query) and you should be up and running again. Team Members: If i forgot anything, please help this user.

elguapo

thanks guys, i'll read on that and try to understand..

Illori

upgrade.php is for upgrading _mostly_ the database not just the files/templates. it is actually not recommended to use the admin function to backup the database, it is recommended to use phpmyadmin or similar to do a backup to make sure you get a full backup. depending on how the sql file was created it may need to be ran though the upgrade.php script, I would not recommend running it though phpmyadmin unless the user knows a bit about what they are doing.

Road Rash Jr.

Quote from: Illori on January 06, 2011, 11:25:29 AM
upgrade.php is for upgrading _mostly_ the database not just the files/templates. it is actually not recommended to use the admin function to backup the database, it is recommended to use phpmyadmin or similar to do a backup to make sure you get a full backup. depending on how the sql file was created it may need to be ran though the upgrade.php script, I would not recommend running it though phpmyadmin unless the user knows a bit about what they are doing.


Wait, stop the presses, it is actually not recommended to use the admin function to back up the database? Why is that exactly????
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Illori

depending on your php execution time it may not do a complete backup of your database and only a part of it will get backed up.

elguapo

i've watched a youtube tutorial on how to back up database using myphpadmin, and in the tutorial, he downloaded the database using myphpadmin... is that recommended?

Road Rash Jr.

Quote from: Illori on January 06, 2011, 12:28:33 PM
depending on your php execution time it may not do a complete backup of your database and only a part of it will get backed up.

Php execution time? What or when is that? I have read most if not all the docs on database BU but haven't come across this before.
The other curious fact here is that you say it isn't recommended yet it is recommended in the BDBU docs.
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Baby Daisy

あなたは私のお尻にキスするとき、私はそれを愛する

Road Rash Jr.

Quote from: Baby Moonview Daisy on January 06, 2011, 01:02:08 PM
Refer to php.ini for execution time

I don't get it. php.ini has nothing in there explaining "execution time" nor when it occures whether naturally or by force.
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Baby Daisy

max_execution_time value defined in the php.ini, it's not hard to miss. Sets the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error.
あなたは私のお尻にキスするとき、私はそれを愛する

Road Rash Jr.

Ah I see, I found this "max_execution_time = 30" so from what you said this is set to 30 seconds and when this 30 seconds elapses the script stops?
Perhaps we have stumbled on a bug. I have used (always) the admin function to back up the database and it takes an average of 3 to 4 minutes to back up. And I might add it is a complete BU because I have used the BU file to replicate the forum with nothing amis.
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Baby Daisy

Most hosts today have it set to 30 or 60 seconds. Script execution =/= amount of time it takes to download. It means how long it takes to compile the download itself.

If you have a large forum, the tools in the admin panel aren't usable because of this problem. You either have to increase that execution value, or use phpMyAdmin or other utilities to backup your DB.

Not a bug, developer's choice.
あなたは私のお尻にキスするとき、私はそれを愛する

Road Rash Jr.

Quote from: Illori on January 06, 2011, 12:28:33 PM
depending on your php execution time it may not do a complete backup of your database and only a part of it will get backed up.

Ok the "execution time" thing is squared away thanks to BMD. But that still doesn't explain why you say the Admin Function isn't recommended when it is??
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Road Rash Jr.

Quote from: Baby Moonview Daisy on January 06, 2011, 01:27:14 PM
Most hosts today have it set to 30 or 60 seconds. Script execution =/= amount of time it takes to download. It means how long it takes to compile the download itself.

If you have a large forum, the tools in the admin panel aren't usable because of this problem. You either have to increase that execution value, or use phpMyAdmin or other utilities to backup your DB.

Not a bug, developer's choice.

I suggested perhaps a bug because although my setting as you see is 30, my database is large as it takes several minutes beyond this to create and D'Load using the admin function of SMF.
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Baby Daisy

あなたは私のお尻にキスするとき、私はそれを愛する

Road Rash Jr.

Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Advertisement: