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 ..."
}
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
gunsmoke
  • 51
  • 1
  • 5
  • 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 07:43

1 Answers1

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 ..."
}
masegaloeh
  • 17,978
  • 9
  • 56
  • 104
deagh
  • 1,969
  • 5
  • 18
  • 16