MyBB Community Forums

Full Version: mysql backup via ssh?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
would it be ok if i backup my database via ssh?
my database is so big and can't backup it via the mybb admin control panel cause this process consume all the resources (VPS).

SO would it be ok if i backup my database via ssh?
will the database backup works without problems?
or i should use another method?

thanks
Yes, you can do this, login to mysql.
use following command.
mysql> mysqldump -u username -p database_name> "/var/www/admin/backups/backup37812638762376.sql"
Quote:and than it will ask password, give password. you are done.
But remember, verify the location /var/www/admin/backups" <- verify what is your location and save it there.

and yes, I will ask if any mybbsupport team mate or anyone with very good knowledge can verify if one can do this. As I have not tries this with mybb.
mysqldump -uUSERNAME -p DATBASE_NAME > BACKUP.sql

That's shell command. Replace USERNAME and DATABASE_NAME and BACKUP with your own data.

To import the backup use this:

mysql -uUSERNAME -p DATBASE_NAME < BACKUP.sql
wooo... i thought to import we use>

source command.
mysql> source /var/www/admin/backups/filename.sql
and dont forget to make your forum OFFLINE before do that Wink
(2011-04-11, 06:08 PM)FBI Wrote: [ -> ]and dont forget to make your forum OFFLINE before do that Wink

:-s why so ?
When you do backups, you don't want people posting on your site, it'll corrupt your backup.
(2011-04-11, 06:08 PM)grave Wrote: [ -> ]wooo... i thought to import we use>

source command.
mysql> source /var/www/admin/backups/filename.sql

Only if you have no password for your mysql and the sql file has the DB info. If you're able to run that command then your mysql is not fully secured.