Skip to content
Snippets Groups Projects
example.borg 3.84 KiB
Newer Older
  • Learn to ignore specific revisions
  • ##
    ## This is an example borgbackup configuration file.
    ##
    ## Here you can find all the possible borgbackup options, details of
    ## what the options provide and possible settings. The defaults are set
    ## as the commented out option, uncomment and change when
    ## necessary. Options which are uncommented in this example do not have
    ## defaults, and the settings provided are recommended.
    
    ##
    ## The defaults are useful in most cases, just make sure to configure the
    
    ## destination host and user.
    ##
    
    ## default is 0, but set to 19 if you want to lower the priority.
    ## an example setting would be:
    ## nicelevel = 19
    ##
    ## Default
    # nicelevel = 0
    
    ## default is yes. set to no to skip the test if the remote host is alive
    ##
    ## Default:
    
    ## default is not to limit bandwidth. 
    ## set to a number in kiBytes/second to limit bandwidth usage. 
    ##
    ## Default:
    # bwlimit = 0
    
    
    ######################################################
    ## source section
    ## (where the files to be backed up are coming from)
    
    [source]
    
    
    ## how many hours, days, weeks and months of data to keep
    
    ##
    ## for more info see : borg help prune
    
    # keephourly = 1
    
    # keepdaily = 7
    # keepweekly = 4
    # keepmonthly = -1
    
    ## A few notes about includes and excludes:
    
    ## 1. include paths do not support any kind of pattern matching
    ## 2. exclude paths support several types of pattern matching, the default being
    ##    shell-style matching, where, for example, '*' matches any number of
    ##    characters. for more info, see : borg help patterns
    ## 3. Symlinks are preserved (not followed).
    
    ##
    ## for more info see : borg help patterns
    ##
    
    ## files to include in the backup
    include = /opt
    include = /srv
    include = /etc
    include = /root
    include = /home
    include = /usr/local
    
    include = /var
    
    
    ## files to exclude from the backup
    exclude = /var/lock
    exclude = /var/run
    exclude = /var/cache
    exclude = /var/tmp
    exclude = /var/lib/mongodb/journal
    exclude = /var/lib/clamav
    exclude = /var/lib/mlocate
    exclude = /var/lib/postgresql
    exclude = /var/lib/mysql
    
    ######################################################
    ## destination section
    ## (where the files are copied to)
    
    [dest]
    
    ## put the backups under this directory, this must be set!
    ## an example setting would be:
    ## directory = /backups
    
    ## Default:
    # directory =
    
    ## the machine which will receive the backups.
    ## an example setting would be:
    ## host = backuphost
    ##
    
    ## set host = localhost for local backups (no ssh)
    ##
    
    ## Default
    # host =
    
    ## make the files owned by this user. you must be able to
    ## `su -c "ssh backupuser@backhost"` without specifying a password.
    ## an example setting would be:
    ## user = backupuser
    ##
    ## Default:
    # user =
    
    ## archive name, should be unique every day.
    ## Format tags available :
    ## {now}, {utcnow}, {fqdn}, {hostname}, {user}, {pid}
    
    ##
    ## for more info see : borg help create
    
    # archive = {now:%Y-%m-%dT%H:%M:%S} 
    
    ## can be "none", "lz4", "zstd[,L]", "zlib[,L]", "lzma[,L]", "auto,C[,L]".
    
    ## - "none" stands for "no compression"
    
    ## - "lz4" offers very high speed, very low compression
    ## - "zstd" is a modern wide-range algorithm
    ## - "zlib" offers medium speed, medium compression
    ## - "lzma" offers low speed, high compression
    ## - "auto,C" will use a heuristic to decide whether to compress using
    ##            selected algorithm C
    ##
    ## for more info see : borg help compression
    
    
    ## encryption mode to use for repository creation
    ##
    ## can be "none", "repokey" or "repofile"
    ## - "none" = no encryption
    ## - "repokey" = encryption with key stored inside the repository
    ## - "repofile" = encryption with key stored in ~/.config/borg/keys/
    ##
    
    ## for more info see : borg help init
    
    ##
    ## Default:
    # encryption = none
    
    ## passphrase of the key used for repository encryptions
    ##
    ## must be set if encryption != none
    ## encryption is disabled by default
    ##
    ## Default:
    # passphrase =