Project

General

Profile

Ubuntu MySQL database recovery

Added by Jack Peng almost 10 years ago

Dear all,

I use the follow command line in Ubuntu to backup MySQL database and upload files:

database:
/usr/bin/mysqldump -u<username> -p<password> redmine | gzip >
/home/redmine_backup/databases/redmine_`date +"20%y.%m.%d_%H.%M"`.gz

upload files:
rsync -a /opt/redmine/redmine/files /home/redmine_backup/files

But, how can I recovery redmine if the system break down?
btw, I know how to setup Redmine step by step in Ubuntu.
But don't know how to recovery the backuped data (redmine_yyyy.mm.dd_hh.mm.gz) into MySQL database.

would someone share the methods to me?

ps. I'm a new guy to use Ubuntu and MySQL, Redmine...

Thank you very much for your attentions!


Replies (2)

RE: Ubuntu MySQL database recovery - Added by Martin Denizet (redmine.org team member) almost 10 years ago

Hello Jack,

You should decompress your file:

gunzip <backupfile>.gz

Then you should create the DB and then import the backup. See detailed explanations.

Cheers,

RE: Ubuntu MySQL database recovery - Added by Jack Peng almost 10 years ago

Thanks Martin, it works now!

    (1-2/2)