PDA

View Full Version : Best Way to Perform Scheduled Backups?


MistyMeanor
06-30-2013, 09:01 PM
I notice I have a backup option in the forum cpanel itself, but also have backup options via web server... what is the best way to back up the forum nightly to where I can revert back quickly if need be due to maybe installing a wacky hack (like what just happened with the vbSocial hack that made my profiles show blank).

I do NOT want to risk losing any threads or posts, or anything within the forum. I need to not feel scared to death to install hacks to where if one is wonky, I can just quickly revert to a previous back up or something.

Amaury
07-01-2013, 03:04 AM
phpMyAdmin.

snakes1100
07-01-2013, 07:17 AM
The best way to back up is NOT via a php based script like phpmyadmin.

The proper way is to use the cmd line via mysqldump or a shell based script, thats going to trigger mysqldump.

MistyMeanor
07-02-2013, 12:14 AM
I am on a Mac snakes1100, how do I do the cmd and do mysqldump?

Lynne
07-02-2013, 01:07 AM
From the manual:
Backing Up The Database via SSH/Telnet (https://www.vbulletin.com/docs/html/maintenance_ssh_backup) or
Backing Up The Database via phpMyAdmin (https://www.vbulletin.com/docs/html/maintenance_phpmyadmin_backup)

Restoring The Database via SSH/Telnet (https://www.vbulletin.com/docs/html/maintenance_ssh_restore) or
Restoring The Database via phpMyAdmin (https://www.vbulletin.com/docs/html/maintenance_phpmyadmin_restore)

If you don't have shell access, some people have also reported success with these scripts:
MySQLDumper (https://www.mysqldumper.de/en/index.php)
MySQLHotxcopy (https://www.vbulletin.com/forum/showthread.php?t=134821&highlight=mysqlhotcopy)
Bigdump (http://www.ozerov.de/bigdump.php)

On a Mac, use Terminal to connect to your server via SSH.

MistyMeanor
07-02-2013, 01:37 AM
Ok so I was able to do it and figure it out through phpMyAdmin ... but this is something I have to manually do all the time?

Lynne
07-02-2013, 01:40 AM
Unless you set up a cron job (something through your cPanel or a modification you install), then yes you will have to do is manually.

MistyMeanor
07-02-2013, 02:59 AM
I am trying to set up a cron job... I have the day/time, etc. set up... but the last thing is asks for is "command" and I have to type something in... any idea on what to type in to do the SQL Dump?

snakes1100
07-02-2013, 02:51 PM
To use the cmd line, you need to shell into your server via ssh or in your case a terminal on your mac, just open a terminal window.

Select the Go option from the main menu bar and select the Utilities menu, then select the Terminal Application.

@ the prompt, type the following:
ssh username@iptoserverhere

As your on a whm/cpanel server, there is no need to manually dump the db, unless you want just the db & not your file structure.

WHM & Cpanel both have automated backup systems, WHM you can setup to run itself & backup nightly to a folder yo ucan DL from.

Cpanel, you have to click the backup link & generate the backup, then download it.