Bacula » History » Version 1
  Joseph Foley, 2015-09-05 03:03 
  
| 1 | 1 | Joseph Foley | h1. Bacula  | 
|---|---|---|---|
| 2 | |||
| 3 | h2. Reference  | 
||
| 4 | |||
| 5 | * MySQL backup http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html  | 
||
| 6 | * What is Bacula http://www.bacula.org/en/dev-manual/main/main/What_is_Bacula.html  | 
||
| 7 | * Ubuntu Bacula https://help.ubuntu.com/10.04/serverguide/C/bacula.html  | 
||
| 8 | * Bacula on disks http://www.bacula.org/en/dev-manual/main/main/Basic_Volume_Management.html  | 
||
| 9 | |||
| 10 | h2. Instructions  | 
||
| 11 | |||
| 12 | * Install the database  | 
||
| 13 | <pre>sudo apt-get install mysql-server</pre>  | 
||
| 14 | ** postfix: internet site  | 
||
| 15 | ** Set the root db password to: thirtysomethinglads  | 
||
| 16 | ** Because the database is not running yet, you will get an error if you try to install bacula first  | 
||
| 17 | * Install bacula  | 
||
| 18 | <pre> sudo apt-get install bacula</pre>  | 
||
| 19 | |||
| 20 | h3. Config files  | 
||
| 21 | |||
| 22 | * Edit @/etc/bacula/bacula-sd.conf@  | 
||
| 23 | ** Set this line in the @Device@ entry  | 
||
| 24 | <pre>  | 
||
| 25 | Storage {                             # definition of myself | 
||
| 26 | Name = backup.dev.ru.is-sd  | 
||
| 27 | SDPort = 9103 # Director's port  | 
||
| 28 | WorkingDirectory = "/var/lib/bacula"  | 
||
| 29 | Pid Directory = "/var/run/bacula"  | 
||
| 30 | Maximum Concurrent Jobs = 20  | 
||
| 31 | SDAddress = 130.208.209.39  | 
||
| 32 | }  | 
||
| 33 | </pre>  | 
||
| 34 | * Edit @/etc/bacula/bacula-dir.conf@  | 
||
| 35 | ** Set the Address line in the @Storage@  | 
||
| 36 | <pre>Storage { | 
||
| 37 | Name = File  | 
||
| 38 | # Do not use "localhost" here  | 
||
| 39 | Address = backup.dev.ru.is # N.B. Use a fully qualified name here  | 
||
| 40 | SDPort = 9103  | 
||
| 41 | Password = "Igz3_-w2AWuatsrX6dwmLcvClzlBwsqd4"  | 
||
| 42 | Device = FileStorage  | 
||
| 43 | Media Type = File  | 
||
| 44 | }  | 
||
| 45 | </pre>  | 
||
| 46 | ** Create a test fileset  | 
||
| 47 | <pre>FileSet { | 
||
| 48 | Name = "LocalhostFiles"  | 
||
| 49 |         Include { | 
||
| 50 |         Options { | 
||
| 51 | signature = MD5  | 
||
| 52 | compression = GZIP  | 
||
| 53 | }  | 
||
| 54 | File = /etc  | 
||
| 55 | File = /home  | 
||
| 56 | }  | 
||
| 57 | }  | 
||
| 58 | </pre>  | 
||
| 59 | ** Create a schedule for this job  | 
||
| 60 | <pre># LocalhostBackup Schedule -- Daily  | 
||
| 61 | Schedule { | 
||
| 62 | Name = "LocalhostDaily"  | 
||
| 63 | Run = Full daily at 00:01  | 
||
| 64 | }  | 
||
| 65 | </pre>  | 
||
| 66 | ** Now create the job  | 
||
| 67 | <pre>Job { | 
||
| 68 | Name = "BackupServer"  | 
||
| 69 | JobDefs = "DefaultJob"  | 
||
| 70 | Schedule = "LocalhostDaily"  | 
||
| 71 | }  | 
||
| 72 | </pre>  | 
||
| 73 | * Really, you should just go look at the files on stekkjarstaur (bacula-dir)  | 
||
| 74 | |||
| 75 | h2. Errors and Issues  | 
||
| 76 | |||
| 77 | If you get permission denied when connecting to the storage server, you need to fix the SDAddress to be an IP address.  | 
||
| 78 | http://www.brandonking.net/blog/2006/08/31/bacula-failed-to-connect-to-storage-daemon/  | 
||
| 79 | This is true for both the sd and the fd  |