1.. _basejobs:
2
3File Deduplication using Base Jobs
4==================================
5
6:index:`\ <single: Base Jobs>`\  :index:`\ <single: File Deduplication>`\
7
8A base job is sort of like a Full save except that you will want the FileSet to contain only files that are unlikely to change in the future (i.e. a snapshot of most of your system after installing it). After the base job has been run, when you are doing a Full save, you specify one or more Base jobs to be used. All files that have been backed up in the Base job/jobs but not modified will then be excluded from the backup. During a restore, the Base jobs will be automatically pulled in where
9necessary.
10
11Imagine having 100 nearly identical Windows or Linux machine containing the OS and user files. Now for the OS part, a Base job will be backed up once, and rather than making 100 copies of the OS, there will be only one. If one or more of the systems have some files updated, no problem, they will be automatically backed up.
12
13A new Job directive :strong:`Base=JobX,JobY,...`\  permits to specify the list of files that will be used during Full backup as base.
14
15::
16
17   Job {
18      Name = BackupLinux
19      Level= Base
20      ...
21   }
22
23   Job {
24      Name = BackupZog4
25      Base = BackupZog4, BackupLinux
26      Accurate = yes
27      ...
28   }
29
30In this example, the job ``BackupZog4`` will use the most recent version of all files contained in ``BackupZog4`` and ``BackupLinux`` jobs. Base jobs should have run with :strong:`Level=Base`\  to be used.
31
32By default, Bareos will compare permissions bits, user and group fields, modification time, size and the checksum of the file to choose between the current backup and the BaseJob file list. You can change this behavior with the ``BaseJob`` FileSet option. This option works like the :strong:`Verify`\ , that is described in the :ref:`FileSet <DirectorResourceFileSet>` chapter.
33
34::
35
36   FileSet {
37     Name = Full
38     Include = {
39       Options {
40          BaseJob  = pmugcs5
41          Accurate = mcs
42          Verify   = pin5
43       }
44       File = /
45     }
46   }
47
48.. warning::
49
50   The current implementation doesn't permit to scan
51   volume with :command:`bscan`. The result wouldn't permit to restore files easily.
52