1

I'm the beginner of bacula backup solution. I'm trying to backup my website built by wordpress.

This is the Job and FileSet to backup documents root directory.

Job {
  Name = WebServerBackup
  Pool = File
  Client = losttemple-fd
  JobDefs = DefaultJob
  FileSet = WebServerFiles
}

FileSet {
  Name = WebServeFiles
  Include {
    Options {
      signature = MD5
    }
    File = /var/www
  }
}

But the problem is a database, MySQL. Could you please tell me how to backup wordpress website's database by bacula? Is it impossible to backup just some directories?


Thanks. deagh. I need to run script in remote webserver. So I added the RunsOnClient option in RunScript.

RunScript {
  RunsWhen = Before
  FailJobOnError = Yes
  RunsOnClient = Yes
  Command = "mysqldump ..."
}
  • user2681054, looks like you're happy with deagh's answer (which I liked, too). May I suggest you accept it by clicking the "tick" outline next to it? That drives the SF reputation system for both you and deagh, and stops the question floating around forever like a querulous albatross. – MadHatter Nov 20 '14 at 7:43
2

You have to add mysqldump or a script which dumps your database before the job run:

RunScript {
   RunsWhen = Before
   FailJobOnError = Yes
   Command = "mysqldump ..."
}

If you need to run script in remote webserver, add the RunsOnClient option in RunScript.

RunScript {
  RunsWhen = Before
  FailJobOnError = Yes
  RunsOnClient = Yes
  Command = "mysqldump ..."
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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