Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: am71 - syyskuu 06, 2011, 03:07:22 IP

Otsikko: Can't backup database - timing out
Kirjoitti: am71 - syyskuu 06, 2011, 03:07:22 IP
Hello,

I'm running SMF 1.1.14 on a VPS Server - 3GB RAM

I'm unable to back up my database.  It hangs for 5+ minutes, then times out. Here's what I'm doing:

Maintenance --> Forum Maintenance --> Forum Maintenance - Backup Database:

x- Save the table structure. (Tried both yes and no)

Yes - Save the table data. (the important stuff.)

x - Compress the file with gzip. (Tried both yes and no)

When I click download, it hangs and hangs, then times out.

Can anyone offer any tips on what might be going wrong?
Otsikko: Re: Can't backup database - timing out
Kirjoitti: Illori - syyskuu 06, 2011, 03:09:41 IP
take a look at How do I backup my database? (http://wiki.simplemachines.org/smf/How_do_I_save_the_database_data)
Otsikko: Re: Can't backup database - timing out
Kirjoitti: MrPhil - syyskuu 06, 2011, 08:08:17 IP
You're better off using phpMyAdmin to back up your database, anyway. If you've allowed the database to become huge, as you're on a VPS you should be able to set time limits large enough to run a long-running backup process. Worst case, you would go into phpMyAdmin and start truncating huge tables. How many hundreds of thousands of entries are in your error log? How about the sessions table? Any table with "log" in the name isn't vital to operation, although you would want to be careful about which ones you play with (not truncating/emptying some and not others). The error log and sessions tables should be safe to empty out, though you might want to record the most common recent errors first, so you can address them.
Otsikko: Re: Can't backup database - timing out
Kirjoitti: Rohan_ - syyskuu 07, 2011, 02:49:41 IP
if you are using VPS then u must be having root access.. it's very easy to take backups and restoring from SSH and it's best.

1. Login to SSH as root using Putty.
2. copy and paste this "mysqldump --opt -u user -p dbname > pathtosave.sql" ( DO THIS WITHOUT QUOTES AND REPLACE user and dbname with your username of database and database name. and replace pathtosave.sql with the path where u want to save ur backup.. E.G /home/backup.sql )

3. Then Simply Login to FTP and find the location where u saved ur database backup and download it :)
Otsikko: Re: Can't backup database - timing out
Kirjoitti: am71 - syyskuu 07, 2011, 10:43:39 IP
Thanks to all - my forum is safely backed up. Many, many thanks.  ;D ;D ;D
Otsikko: Re: Can't backup database - timing out
Kirjoitti: Rohan_ - syyskuu 08, 2011, 10:47:38 AP
You're most welcome am71.

If you need more help regarding anything just let us know. SMF support team is always there for you.