Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using the following command to backup a large running mysql database (~500GB).

innobackupex --user=user --password=***** --stream=tar ./db-backup | bzip2 - > backup.tar.bz2

Since the backup process takes more than 24 hours, I want to run the task in the background. Background task doesn't work unfortunately with the following command and as soon as my ssh session to the server is closed (or a connection reset occurs) backup process terminates:

nohup innobackupex --user=user --password=***** --stream=tar ./db-backup | bzip2 - > backup.tar.bz2

Please advice.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Use screen or tmux. Alternatively, start it from a cron job.

share|improve this answer
    
Thanks, solved by installing screen, running it, running innobackupex without nohup, and then pressing Ctrl+a d to detach session. –  Mohsen Jan 17 '13 at 17:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.