#############################################################
# This is the default system wide configuration file for dar
#
# This file provide a set of options referred each by a target
# name. They are not applied unless you specify that target on
# command line or included file. For example for par2:
# dar <...list of options...> par2
#
# This options set are available automatically for dar unless
# you define a .darrc in your home directory or use -N option
# on command-line.
# You can continue using this default file even if you use your
# own .darrc file, by including the following in it or explicitly
# command-line:
#
#     -B /etc/darrc
#
# In the following we are using short options here because long
# options may not be available everywhere.

##############################################################
# target: par2
# activates:
#   - par2 file generation when creating an archive
#   - par2 file verification and correction when testing an archive
# usage: dar <options...>  par2

par2:
  -B "/opt/local/share/dar/samples/dar_par.dcf"

##############################################################
# target: compress-exclusion
# avoid compressing types of file known to already be compressed
# or to have very bad compression ratio
#
# usage: dar <options...> compress-exclusion

compress-exclusion:
# here we define some files that have not to be compressed.
# First setting case insensitive mode on:
-an
# Then telling dar that the following masks are glob expression
# which is the default, right, but if sooner on command-line the
# user swapped to regex, the following mask would not work as expected
# any more, so we force back to glob expression in any case:
-ag

# Now follows all the file specification to never try to compress:

# Compressed video format.
-Z "*.avi"
-Z "*.cr2"
-Z "*.flv"
-Z "*.jng"
-Z "*.m4v"
-Z "*.mkv"
-Z "*.mov"
-Z "*.mp4*"
-Z "*.mpeg"
-Z "*.mpg"
-Z "*.mts"
-Z "*.m2ts"
-Z "*.oga"
-Z "*.swf"
-Z "*.vob"
-Z "*.webm"
-Z "*.wmv"

# Compressed animation.
-Z "*.mng"

# Compressed image format.
-Z "*.bmp"
-Z "*.gif"
-Z "*.ico"
-Z "*.jpe"
-Z "*.jpeg"
-Z "*.jpg"
-Z "*.mmpz"
-Z "*.mpeg"
-Z "*.png"
-Z "*.tif"
-Z "*.tiff"
-Z "*.webp"

# Compressed audio format.
-Z "*.ac3"
-Z "*.als"
-Z "*.ape"
-Z "*.bonk"
-Z "*.flac"
-Z "*.m4a"
-Z "*.mp2"
-Z "*.mp3"
-Z "*.mpc"
-Z "*.nsf"
-Z "*.ogg"
-Z "*.speex"
-Z "*.spx"
-Z "*.weba"
-Z "*.wv"

# Compressed package.
-Z "*.deb"
-Z "*.rpm"
-Z "*.run"
-Z "*.sis"
-Z "*.xpi"

# Compressed data.
-Z "*.7z"
-Z "*.Z"
-Z "*.bz2"
-Z "*.cab"
-Z "*.gz"
-Z "*.jar"
-Z "*.rar"
-Z "*.tbz"
-Z "*.tbz2"
-Z "*.tgz"
-Z "*.txz"
-Z "*.wsz"
-Z "*.wz"
-Z "*.xz"
-Z "*.zst"
-Z "*.zstd"
# These are zip files. Not all are compressed, but considering that they can
# get quite large it is probably more prudent to leave this uncommented.
-Z "*.pk3"
-Z "*.zip"
# You can get better compression on these files, but then you should be
# de/recompressing with an actual program, not dar.
-Z "*.lz4"
-Z "*.zoo"

# Other, in alphabetical order.
-Z "*.Po"
-Z "*.aar"
-Z "*.azw"
-Z "*.azw3"
-Z "*.bx"
-Z "*.chm"
-Z "*.djvu"
-Z "*.docx"
-Z "*.epub"
-Z "*.f3d"
-Z "*.gpg"
-Z "*.htmlz"
-Z "*.iix"
-Z "*.iso"
-Z "*.jin"
-Z "*.ods"
-Z "*.odt"
-Z "*.odp"
-Z "*.pdf"
-Z "*.pptx"
-Z "*.ser"
-Z "*.svgz"
-Z "*.swx"
-Z "*.sxi"
-Z "*.whl"
-Z "*.wings"
-Z "*.xlsx"

# These are blender bake files. Compression on these is optional in blender.
# Blender's compression algorithm is better at compressing these than xz or
# any other compression program that I have tested.
# Comment only if you use uncompressed blender bake files.
-Z "*.bphys"

# Dar archives (may be compressed).
-Z "*.dar"

# Now we swap back to case sensitive mode for masks which is the default
# mode:
-acase

##############################################################
#  target: verbose
#  show both skipped files and files being processed
#
# usage: dar <options> verbose
verbose:
-va


##############################################################
# target: no-emacs-backup
# ignore temporary files or backup files generated by emacs
#
no-emacs-backup:
-ag
-X "*~"
-X ".*~"

##############################################################
# target: samba
# take care of daylight saving time for the samba file system
# type

samba:
-H 1
# samba file system need this to properly report date
# and not lead dar to resave all files when changing
# from summer to winter time and vice versa.

##############################################################
# target: dry-run
# an alias for --empty option, that get its name because the
# only available option letter was 'e' that leads to this non
# intuitive option name "empty".
#
dry-run:
-e

##############################################################
# target: bell
# ring the terminal upon user interaction request
#
bell:
-b

##############################################################
# target: full-from-diff
# rebuilds a full backup from a differential backup and its
# full backup of reference
# usage: dar -+ new_full -A old_ref_full -@ diff full-from-diff
#
# can also be used to rebuild a full backup from a decremental
# backup and a full backup
# usage: dar -+ old_full -A recent_fill -@ decr full-from-diff

full-from-diff:
-/ '{!(~I)}[Rr] {S&~P}[O*] {~S}[O*] P* ; {~s}[*o] *p'
