0

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.

Mohsen
  • 103
  • 2

1 Answers1

1

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

Sven
  • 98,649
  • 14
  • 180
  • 226
  • 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