ConfigurationΒΆ

  • Example Configuration (/etc/bun/bun.yaml):

    yaml:
    
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
bun:
  backup_dir: /backup           # location we backup to
  default: [                    # default 'spec sets' to backup; see spec dict later on
    homes,
    bun
    ]
  spec:                         # directory/file sets that can be backed up
    homes: [                    # unique token to identify the set
      home,
      root
    ]
    bun: [
      etc/bun,
      etc/oam/conf.d/bun.yaml
      ]
  • Default Builtin Configuration:

    python:
    
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
DEFAULT_CONFIG = {
    'bun': {
        'backup_dir': '/backup',         # location we backup to
        'checksum': 'sha256sum',         # checksum program to use - leave empty for no checksum generation
        'compress': 'xz -9',             # compression command to use - leave empty for no compression; also see suffix
        'default': ['homes'],            # default 'spec set(s)' to backup; see: spec dict later on
        'nice': 'nice ionice -c3',       # nice'ness to use - leave empty for no nice'ness
        'suffix': 'xz',                  # add this suffix to the generated tarball; see compress program earlier
        'start_dir': '/',                # paths to backup are relative to this dir
        'tar_opts': [                    # options to pass to tar
            '--exclude-caches',
            '--exclude-vcs',
            '--exclude-vcs-ignores',
            '--one-file-system'
            ],
        'timespec': '%Y%m%d-%H%M%S',     # alt: '%Y%m%d'
        'spec': {                        # directory sets that can be backed up
            'homes': [                   # unique token to identify the set (the reserved token 'all' means all sets)
                'home',                  # list of directories/files to backup relative to the start_dir
                'root'
                ]
        }
    },
    'run': {                             # invoke default overrides
        'echo': True
    }
}