Bacula Сравнение версий

Различия

Здесь показаны различия между двумя версиями данной страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
wiki:руководство_по_ubuntu_server:резервное_копирование:bacula [2012/09/21 14:54]
[Настройка]
wiki:руководство_по_ubuntu_server:резервное_копирование:bacula [2017/12/12 11:35] (текущий)
ссылка на русскоязычную документацию
Строка 62: Строка 62:
 ====Резервное копирование локальной системы==== ====Резервное копирование локальной системы====
  
-This section describes how to backup specified directories on a single host to a local tape drive.+Эта секция описывает как сделать резервную копию определенных каталогов на единственном сервере на локальное ленточное устройство.
  
-    First, the Storage device needs to be configuredEdit /​etc/​bacula/​bacula-sd.conf ​add:+ 1Для начала требуется настроить устройство хранения. Отредактируйте ​/​etc/​bacula/​bacula-sd.conf, добавив: 
 +<​code>​ 
 +Device { 
 +  Name = "Tape Drive"​ 
 +  Device Type = tape 
 +  Media Type = DDS-4 
 +  Archive Device = /dev/st0 
 +  Hardware end of medium = No; 
 +  AutomaticMount = yes;               # when device opened, read it 
 +  AlwaysOpen = Yes; 
 +  RemovableMedia = yes; 
 +  RandomAccess = no; 
 +  Alert Command = "sh -c '​tapeinfo -f %c | grep TapeAlert'"​ 
 +
 +</​code>​ 
 +Этот пример для ленточного устройства **//​DDS-4//​**. Измените **%%"​Media Type"​%%** и **%%"​Archive Device"​%%** в соответствии с вашим оборудованием.
  
-    Device { +Вы также можете раскомментировать один из примеров в этом файле.
-      Name = "Tape Drive"​ +
-      Device Type = tape +
-      Media Type = DDS-4 +
-      Archive Device = /dev/st0 +
-      Hardware end of medium = No; +
-      AutomaticMount = yes;               # when device opened, read it +
-      AlwaysOpen = Yes; +
-      RemovableMedia = yes; +
-      RandomAccess = no; +
-      Alert Command = "sh -c '​tapeinfo -f %c | grep TapeAlert'"​ +
-    }+
  
-    The example is for a DDS-4 tape driveAdjust the “Media Type” and “Archive Device” to match your hardware.+ 2. После редактирования файла /​etc/​bacula/​bacula-sd.conf сервис **Storage** требуется перезагрузить:​ 
 +<​code>​sudo /etc/init.d/bacula-sd restart</​code>​
  
-    You could also uncomment one of the other examples in the file.+ 3. Теперь добавьте ресурс **Storage** в файл /​etc/​bacula/​bacula-dir.conf для использования нового устройства:​ 
 +<​code>​ 
 +# Definition ​of "Tape Drive" storage device 
 +Storage { 
 +  Name = TapeDrive 
 +  # Do not use "​localhost"​ here     
 +  Address = backupserver ​              # N.B. Use a fully qualified name here 
 +  SDPort = 9103 
 +  Password = "​Cv70F6pf1t6pBopT4vQOnigDrR0v3LT3Cgkiyjc"​ 
 +  Device = "Tape Drive"​ 
 +  Media Type = tape 
 +
 +</​code>​ 
 +Директива **Address** должна быть полностью квалифицированным доменным именем (FQDN) сервера. Замените **backupserver** на актуальное сетевое имя.
  
-    After editing ​/​etc/​bacula/​bacula-sd.conf ​the Storage daemon will need to be restarted:+Также убедитесь,​ что директива **Password** соответствует строке пароля в /​etc/​bacula/​bacula-sd.conf.
  
-    sudo /etc/init.d/bacula-sd restart + 4Создайте новый **FileSet**,​ который будет определять какие каталоги копировать,​ добавив
- +<​code>​ 
-    Now add a Storage resource in /​etc/​bacula/​bacula-dir.conf to use the new Device+LocalhostBacup FileSet. 
- +FileSet ​
-    Definition of "Tape Drive" storage device +  Name = "LocalhostFiles
-    ​Storage ​+  ​Include { 
-      Name = TapeDrive +    ​Options { 
-      # Do not use "localhost" ​here    ​ +      ​signature ​MD5 
-      ​Address = backupserver ​              # N.B. Use a fully qualified name here +      ​compression=GZIP
-      ​SDPort = 9103 +
-      ​Password ​"​Cv70F6pf1t6pBopT4vQOnigDrR0v3LT3Cgkiyjc"​ +
-      Device = "Tape Drive" +
-      ​Media Type tape+
     }     }
 +    File = /etc
 +    File = /home
 +  }
 +}
 +</​code>​
 +Этот **FileSet** задает резервное копирование для каталогов **/etc** и **/home**. Директивы ресурса **Options** настраивают FileSet на создание контрольных сумм MD5 для каждого сохраненного файла и сжатие файлов с использованием GZIP.
  
-    The Address directive needs to be the Fully Qualified Domain ​Name (FQDN) of the serverChange backupserver to the actual host name.+ 5. Далее создайте новое расписание **Schedule** для задачи резервного копирования:​ 
 +<​code>​ 
 +# LocalhostBackup Schedule -- Daily. 
 +Schedule { 
 +  ​Name = "​LocalhostDaily"​ 
 +  Run = Full daily at 00:01 
 +
 +</​code>​ 
 +Задание будет запускаться каждый день в 00:01Существует множество других доступных опций расписаний.
  
-    Alsomake sure the Password directive matches the password string in /etc/bacula/bacula-sd.conf.+ 6. Наконецсоздадим задание:​ 
 +<​code>​ 
 +# Localhost backup. 
 +Job { 
 +  Name = "​LocalhostBackup"​ 
 +  JobDefs = "​DefaultJob"​ 
 +  Enabled = yes 
 +  Level = Full 
 +  FileSet = "​LocalhostFiles"​ 
 +  Schedule = "​LocalhostDaily"​ 
 +  Storage = TapeDrive 
 +  Write Bootstrap = "/var/lib/bacula/​LocalhostBackup.bsr" 
 +}   
 +</​code>​ 
 +Задание будет выполнять полную резервную копию каждый день на ленту.
  
-    Create a new FileSetwhich will determine what directories to backupby adding:+ 7. Каждая используемая лента должна иметь метку. Если текущая лента метки не имеетBacula отправит email с оповещением. Чтобы установить метку на ленту с помощью **Console**введите в терминале: 
 +<​code>​bconsole</​code>​
  
-    # LocalhostBacup FileSet+ 8В командной строке **Bacula Console** введите:​ 
-    ​FileSet { +<​code>​label<​/code>
-      Name = "​LocalhostFiles"​ +
-      Include { +
-        Options { +
-          signature = MD5 +
-          compression=GZIP +
-        } +
-        File = /etc +
-        File = /home +
-      } +
-    }+
  
-    This FileSet will backup the /etc and /home directories. The Options ​resource ​directives configure the FileSet to create an MD5 signature for each file backed up, and to compress the files using GZIP.+ 9Вам предложат выбрать один из ресурсов **Storage**:​ 
 +<​code>​ 
 +Automatically selected Catalog: MyCatalog 
 +Using Catalog "​MyCatalog"​ 
 +The defined Storage resources are: 
 +     1: File 
 +     2: TapeDrive 
 +Select Storage ​resource ​(1-2):2 
 +</​code>​
  
-    Next, create a new Schedule for the backup job:+ 10. Введите новое имя тома: 
 +<​code>​ 
 +Enter new Volume name: Sunday 
 +Defined Pools: 
 +     1: Default 
 +     2Scratch 
 +</​code>​ 
 +Замените **//​Sunday//​** на соответствующую метку.
  
-    # LocalhostBackup Schedule -- Daily+ 11Теперь выберите накопитель:​ 
-    ​Schedule { +<​code>​ 
-      Name = "​LocalhostDaily"​ +Select the Pool (1-2): 1 
-      Run = Full daily at 00:01 +Connecting to Storage daemon TapeDrive ​at backupserver:9103 ... 
-    }+Sending label command for Volume "​Sunday"​ Slot 0 ... 
 +</​code>​
  
-    The job will run every day at 00:01 or 12:01 am. There are many other scheduling options available. +Поздравляем! Вы настроили ​Bacula ​на резервное копирование локального сервера на подключенное ленточное устройство.
- +
-    Finally create the Job: +
- +
-    # Localhost backup. +
-    Job { +
-      Name = "​LocalhostBackup"​ +
-      JobDefs = "​DefaultJob"​ +
-      Enabled = yes +
-      Level = Full +
-      FileSet = "​LocalhostFiles"​ +
-      Schedule = "​LocalhostDaily"​ +
-      Storage = TapeDrive +
-      Write Bootstrap = "/​var/​lib/​bacula/​LocalhostBackup.bsr"​ +
-    }   +
- +
-    The job will do a Full backup every day to the tape drive. +
- +
-    Each tape used will need to have a Label. If the current tape does not have a label Bacula ​will send an email letting you know. To label a tape using the Console enter the following from a terminal: +
- +
-    bconsole +
- +
-    At the Bacula Console prompt enter: +
- +
-    label +
- +
-    You will then be prompted for the Storage resource: +
- +
- +
-    Automatically selected Catalog: MyCatalog +
-    Using Catalog "​MyCatalog"​ +
-    The defined Storage resources are: +
-         1: File +
-         2: TapeDrive +
-    Select Storage resource (1-2):2 +
- +
-    Enter the new Volume name: +
- +
- +
-    Enter new Volume name: Sunday +
-    Defined Pools: +
-         1: Default +
-         2: Scratch +
- +
-    Replace Sunday with the desired label. +
- +
-    Now, select the Pool: +
- +
- +
-    Select the Pool (1-2): 1 +
-    Connecting to Storage daemon TapeDrive at backupserver:​9103 ... +
-    Sending label command for Volume "​Sunday"​ Slot 0 ... +
- +
-Congratulations,​ you have now configured Bacula to backup the localhost to an attached tape drive.+
  
 ====Ссылки==== ====Ссылки====
  
-    For more Bacula ​configuration options refer to the Bacula User's Manual +  -- Дополнительные опции настройки ​Bacula ​смотрите в руководстве [[http://​www.bacula.org/​en/​rel-manual/​index.html|Bacula User's Manual]]. 
- +  -- [[http://​www.bacula.org/​|Домашняя страница Bacula]] содержит последние новости и доработки по Bacula. 
-    ​The ​Bacula ​Home Page contains the latest ​Bacula ​news and developments+  -- [[https://​www.backup-solutions.ru/​chto-takoe-bacula-enterprise/​|Bacula ​в РФ]] содержит документацию ​Bacula ​на русском языке
- +  -- Также посетите страницу [[https://​help.ubuntu.com/​community/​Bacula|Bacula Ubuntu Wiki]].
-    Also, see the Bacula Ubuntu Wiki page. +
  
 ---- ----