Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

67.4. Bacula, the Open Source, Enterprise ready, Network Backup Tool for Linux, Unix, Mac and Windows.

http://www.bacula.org/

ubuntu 10.10

neo@backup:~$ apt-cache search bacula
bacula - network backup, recovery and verification - meta-package
bacula-client - network backup, recovery and verification - client meta-package
bacula-common - network backup, recovery and verification - common support files
bacula-common-mysql - network backup, recovery and verification - MySQL common files
bacula-common-pgsql - network backup, recovery and verification - PostgreSQL common files
bacula-common-sqlite3 - network backup, recovery and verification - SQLite v3 common files
bacula-console - network backup, recovery and verification - text console
bacula-director-common - network backup, recovery and verification - Director common files
bacula-director-mysql - network backup, recovery and verification - MySQL storage for Director
bacula-director-pgsql - network backup, recovery and verification - PostgreSQL storage for Director
bacula-director-sqlite3 - network backup, recovery and verification - SQLite 3 storage for Director
bacula-fd - network backup, recovery and verification - file daemon
bacula-sd - network backup, recovery and verification - storage daemon
bacula-sd-mysql - network backup, recovery and verification - MySQL SD tools
bacula-sd-pgsql - network backup, recovery and verification - PostgreSQL SD tools
bacula-sd-sqlite3 - network backup, recovery and verification - SQLite 3 SD tools
bacula-server - network backup, recovery and verification - server meta-package
bacula-console-qt - Bacula Administration Tool Console
bacula-director-sqlite - network backup, recovery and verification - SQLite 2 director transition
bacula-doc - Documentation for Bacula
bacula-sd-sqlite - network backup, recovery and verification - SQLite SD tools
bacula-traymonitor - network backup, recovery and verification - tray monitor
	
		

67.4.1. Install Backup Server

过程 67.3. 

  1. 安装bacula服务器

    $ sudo apt-get install bacula
    				
    					

    启动脚本.

    neo@backup:/etc/bacula$ ls -1 /etc/init.d/bacula-*
    /etc/init.d/bacula-director
    /etc/init.d/bacula-fd
    /etc/init.d/bacula-sd
    				
    					

    Bacula Config files

    neo@backup:~$ ls -1 /etc/bacula/
    bacula-dir.conf
    bacula-fd.conf
    bacula-sd.conf
    bconsole.conf
    common_default_passwords
    scripts
    				
    					

    Checking Bacula Daemons Status

    neo@backup:~$ ps auwx | grep bacula
    bacula   25044  0.0  0.1  72624  2092 ?        Ssl  14:55   0:00 /usr/sbin/bacula-sd -c /etc/bacula/bacula-sd.conf -u bacula -g tape
    root     25659  0.0  0.0  60068  1376 ?        Ssl  14:56   0:00 /usr/sbin/bacula-fd -c /etc/bacula/bacula-fd.conf
    bacula   29551  0.0  0.1  87672  3096 ?        Ssl  15:48   0:00 /usr/sbin/bacula-dir -c /etc/bacula/bacula-dir.conf -u bacula -g bacula
    neo      30344  0.0  0.0   7748   876 pts/0    S+   15:57   0:00 grep --color=auto bacula
    				
    					
  2. bconsole

    neo@backup:/etc/bacula$ sudo bconsole
    Connecting to Director localhost:9101
    1000 OK: backup.example.com-dir Version: 5.0.2 (28 April 2010)
    Enter a period to cancel a command.
    *help
      Command       Description
      =======       ===========
      add           Add media to a pool
      autodisplay   Autodisplay console messages
      automount     Automount after label
      cancel        Cancel a job
      create        Create DB Pool from resource
      delete        Delete volume, pool or job
      disable       Disable a job
      enable        Enable a job
      estimate      Performs FileSet estimate, listing gives full listing
      exit          Terminate Bconsole session
      gui           Non-interactive gui mode
      help          Print help on specific command
      label         Label a tape
      list          List objects from catalog
      llist         Full or long list like list command
      messages      Display pending messages
      memory        Print current memory usage
      mount         Mount storage
      prune         Prune expired records from catalog
      purge         Purge records from catalog
      python        Python control commands
      quit          Terminate Bconsole session
      query         Query catalog
      restore       Restore files
      relabel       Relabel a tape
      release       Release storage
      reload        Reload conf file
      run           Run a job
      status        Report status
      setdebug      Sets debug level
      setip         Sets new client address -- if authorized
      show          Show resource records
      sqlquery      Use SQL to query catalog
      time          Print current time
      trace         Turn on/off trace to file
      unmount       Unmount storage
      umount        Umount - for old-time Unix guys, see unmount
      update        Update volume, pool or stats
      use           Use catalog xxx
      var           Does variable expansion
      version       Print Director version
      wait          Wait until no jobs are running
    
    When at a prompt, entering a period cancels the command.
    
    *
    				
    					
  3. 修改配置文件,增加备份策略.

    备份配置文件,以免把文件改坏。

    root@backup:~# cd /etc/bacula/
    root@backup:/etc/bacula# mkdir original
    root@backup:/etc/bacula# cp *.conf original/
    root@backup:/etc/bacula#
    				
    					

    bacula-dir.conf

    root@backup:/etc/bacula# vim bacula-dir.conf
    Job {
      Name = "BackupClient2"
      Client = web-fd
      JobDefs = "DefaultJob"
    }
    
    				
    					

67.4.2. Install Backup Client

  • neo@web:~$ sudo apt-get install bacula-client