# dumptypes
#
# These are referred to by the disklist file.  The dumptype specifies
# certain parameters for dumping including:
#   auth	- authentication scheme to use between server and client.
#		  Valid values are "bsd", "bsdudp", "bsdtcp", "krb5", "local",
#		  "rsh" and "ssh" 
#                 Default: [auth bsd]
#   comment	- just a comment string
#   comprate	- set default compression rate.  Should be followed by one or
#		  two numbers, optionally separated by a comma.  The 1st is
#		  the full compression rate; the 2nd is the incremental rate.
#		  If the second is omitted, it is assumed equal to the first.
#		  The numbers represent the amount of the original file the
#		  compressed file is expected to take up.
#		  Default: [comprate 0.50, 0.50]
#   compress	- specify compression of the backed up data.  Valid values are:
#		  "none"        - don't compress the dump output.
#		  "client best" - compress on the client using the best (and
#				  probably slowest) algorithm.
#		  "client fast" - compress on the client using fast algorithm.
#                 "client custom" - compress using your custom client compression program.
#                                   use client_custom_compress "PROG" to specify
#                                   the custom compression program.
#                                   PROG must not contain white space.
#		  "server best" - compress on the tape host using the best (and
#				  probably slowest) algorithm.
#		  "server fast" - compress on the tape host using a fast
#				  algorithm.  This may be useful when a fast
#				  tape host is backing up slow clients.
#                 "server custom" - compress using your server custom compression program.
#                                   use server_custom_compress "PROG" to specify
#                                   the custom compression program.
#                                   PROG must not contain white space.
#		  Default: [compress client fast]
#   dumpcycle	- set the number of days in the dump cycle, ie, set how often a
#		  full dump should be performed.  Default: from DUMPCYCLE variable
#   estimate      Determine the way AMANDA does it's estimate. 
#		  "client"	- Use the same program as the dumping program,
#				this is the most accurate way to do estimates, 
#				but it can take a long time.
#		  "calcsize"	- Use a faster program to do estimates, but the
#		  		result is less accurate.
#		  "server"	- Use only statistics from the previous run to 
#				give an estimate, 
#				it takes only a few seconds but the result is not 
#				accurate if your disk usage changes from day to day.
#		  Default: [client]
#   encrypt  - specify encryption of the backed up data. Valid values are:
#                 "none"   - don't encrypt the dump output.
#                 "client" - encrypt on the client using the program specified by
#                            client_encrypt "PROG".
#                            Use client_decrypt_option to specify the decrypt-
#                            parameter, default is "-d".
#                            PROG and decrypt-parameter must not contain white space.
#                 "server" - encrypt on the server using the program specified by
#                            server_encrypt "PROG".
#                            Use server_decrypt_option to specify the decrypt-
#                            parameter, default is "-d".
#                            PROG and decrypt-parameter must not contain white space.
#                 Default: [none]
#   exclude	- specify files and directories to be excluded from the dump.
#		  Useful with gnutar only; silently ignored by dump and samba.
#		  Valid values are:
#		  "pattern"       - a shell glob pattern defining which files
#				    to exclude.
#				    gnutar gets --exclude="pattern"
#		  list "filename" - a file (on the client!) containing patterns
#				    re's (1 per line) defining which files to
#				    exclude.
#				    gnutar gets --exclude-from="filename"
#		  Note that the `full pathname' of a file within its
#		  filesystem starts with `./', because of the way amanda runs
#		  gnutar: `tar -C $mountpoint -cf - --lots-of-options .' (note
#		  the final dot!)  Thus, if you're backing up `/usr' with a
#		  diskfile entry like ``host /usr gnutar-root', but you don't
#		  want to backup /usr/tmp, your exclude list should contain
#		  the pattern `./tmp', as this is relative to the `/usr' above.
#		  Please refer to the man-page of gnutar for more information.
#		  If a relative pathname is specified as the exclude list,
#		  it is searched from within the directory that is
#		  going to be backed up.
#		  Default: include all files
#   holdingdisk	- should the holding disk be used for this dump.  Useful for
#		  dumping the holding disk itself.  Default: [holdingdisk auto]
#		  "never"    - Never use the holding disk.
#		  "auto"     - Use the holding disk if possible.
#		  "required" - Always use the holding disk.
#   ignore	- do not back this filesystem up.  Useful for sharing a single
#		  disklist in several configurations.
#   index	- keep an index of the files backed up.  Default: [index no]
#   kencrypt	- encrypt the data stream between the client and server.
#		  Default: [kencrypt no]
#   maxdumps	- max number of concurrent dumps to run on the client.
#		  Default: [maxdumps 1]
#   maxpromoteday - max number of day for a promotion, set it 0 if you don't
#		  want promotion, set it to 1 or 2 if your disk get
#		  overpromoted.
#		  Default: [10000]
#   priority	- priority level of the dump.  Valid levels are "low", "medium"
#		  or "high".  These are really only used when Amanda has no
#		  tape to write to because of some error.  In that "degraded
#		  mode", as many incrementals as will fit on the holding disk
#		  are done, higher priority first, to insure the important
#		  disks are at least dumped.  Default: [priority medium]
#   program	- specify the dump system to use.  Valid values are "DUMP" 
#		  "STAR" and "GNUTAR".  Default: [program "DUMP"].
#   record	- record the backup in the time-stamp-database of the backup
#		  program (e.g. /etc/dumpdates for DUMP or
#		  /var/lib/amanda/gnutar-lists for GNUTAR.).
#		  Default: [record yes]
#   skip-full	- skip the disk when a level 0 is due, to allow full backups
#		  outside Amanda, eg when the machine is in single-user mode.
#   skip-incr	- skip the disk when the level 0 is NOT due.  This is used in
#		  archive configurations, where only full dumps are done and
#		  the tapes saved.
#   starttime	- delay the start of the dump?  Default: no delay
#   strategy	- set the dump strategy.  Valid strategies are currently:
#		  "standard" - the standard one.
#		  "nofull"   - do level 1 dumps every time.  This can be used,
#			       for example, for small root filesystems that
#			       only change slightly relative to a site-wide
#			       prototype.  Amanda then backs up just the
#			       changes.
#		  "noinc"    - do level 0 dumps every time.
#		  "skip"     - skip all dumps.  Useful for sharing a single
#			       disklist in several configurations.
#		  "incronly" - do only incremental dumps. This is similar
#                              to strategy 'nofull', but will increase
#                              the dump level as usual. Full dumps will
#                              only be performed when an 'amadmin force' 
#                              has been issued 
#		  Default: [strategy standard]
#
# Note that you may specify previously defined dumptypes as a shorthand way
# of defining parameters.

# dumptype global defined in $config/amanda.conf

define dumptype always-full {
    global
    comment "Full dump of this filesystem always"
    compress none
    priority high
    dumpcycle 0
}

# Dumptypes for star
define dumptype root-star {
    global
    program "STAR"
    comment "root partitions dumped with star"
    compress none
    index
#    exclude list "/var/lib/amanda/exclude.star"
    priority low
}

define dumptype user-star {
    root-star
    comment "user partitions dumped with star"
    priority medium
}

define dumptype user-star-span {
    root-star
    comment "tape-spanning user partitions dumped with star"
    priority medium
}

define dumptype high-star {
    root-star
    comment "partitions dumped with star"
    priority high
}

define dumptype comp-root-star {
    root-star
    comment "Root partitions with compression"
    compress client fast
}

define dumptype comp-user-star {
    user-star
    compress client fast
}

define dumptype comp-user-star-span {
    user-star-span
    compress client fast
}

# Dumptypes for gnutar

define dumptype root-tar {
    global
    program "GNUTAR"
    comment "root partitions dumped with tar"
    compress none 
    index
    priority low
}


define dumptype user-tar {
    root-tar
    comment "user partitions dumped with tar"
    priority medium
}


define dumptype user-tar-span {
    root-tar
    comment "tape-spanning user partitions dumped with tar"
    priority medium
}


define dumptype high-tar {
    root-tar
    comment "partitions dumped with tar"
    priority high
}

define dumptype comp-root-tar {
    root-tar
    comment "Root partitions with compression dumped with tar"
    compress client fast
}

define dumptype comp-user-tar {
    user-tar
    compress client fast
}

define dumptype comp-user-tar-span {
    user-tar-span
    compress client fast
}


define dumptype holding-disk {
    global
    comment "The master-host holding disk itself"
    holdingdisk never # do not use the holding disk
    priority medium
}

define dumptype comp-user {
    global
    comment "Non-root partitions on reasonably fast machines"
    compress client fast
    priority medium
}

define dumptype comp-user-span {
    global
    comment "Tape-spanning non-root partitions on reasonably fast machines"
    compress client fast
    priority medium
}


define dumptype nocomp-user {
    comp-user
    comment "Non-root partitions on slow machines"
    compress none
}

define dumptype nocomp-user-span {
    comp-user-span
    comment "Tape-spanning non-root partitions on slow machines"
    compress none
}


define dumptype comp-root {
    global
    comment "Root partitions with compression"
    compress client fast
    priority low
}

define dumptype nocomp-root {
    comp-root
    comment "Root partitions without compression"
    compress none
}

define dumptype comp-high {
    global
    comment "very important partitions on fast machines"
    compress client best
    priority high
}

define dumptype nocomp-high {
    comp-high
    comment "very important partitions on slow machines"
    compress none
}

define dumptype nocomp-test {
    global
    comment "test dump without compression, no /etc/dumpdates recording"
    compress none
    record no
    priority medium
}

define dumptype comp-test {
    nocomp-test
    comment "test dump with compression, no /etc/dumpdates recording"
    compress client fast
}

define dumptype nocomp-ssh {
   root-tar
   comment "ssh authorization and dumped with tar"
   auth "ssh"
   ssh_keys "/var/lib/amanda/.ssh/id_rsa_amdump"
   compress none
}
   

define dumptype custom-compress {
   root-tar
   comment "custom client compression, dumped with tar"
   compress client custom
   client_custom_compress "/usr/bin/bzip2"
}

# amcrypt requires aespipe and uuencode
define dumptype encrypt-fast {
   root-tar
   comment "fast client compression and server symmetric encryption, dumped with tar"
   compress client fast
   encrypt server
   server_encrypt "/usr/sbin/amcrypt"
   server_decrypt_option "-d"
}


# amcryptsimple use gpg symmetric encryption. gpg does compress with zlib by default.
# Thus, specify compress none.
define dumptype encrypt-simple-nocomp {
   root-tar
   comment "client simple symmetric encryption, dumped with tar"
   compress none
   encrypt client
   client_encrypt "/usr/sbin/amcryptsimple"
   client_decrypt_option "-d"
}

# To use gpg public-key encryption, gpg does compress with zlib by default.
# Thus, specify compress none.

define dumptype gpg-encrypt-nocomp {
   root-tar
   comment "server public-key encryption, dumped with tar"
   compress none
   encrypt server
   server_encrypt "/usr/sbin/amgpgcrypt"
   server_decrypt_option "-d"
}

# The following dumptypes are for ZMC
# dumptype gui-base defined in $config/amanda.conf

define dumptype gui-default {
   gui-base
   comment "gui default dumptype"
   compress none
   encrypt none
}

define dumptype gui-compress {
   gui-base
   comment "gui dumptype with compression"
   compress client fast
   encrypt none
}

define dumptype gui-encrypt {
   gui-base
   comment "gui dumptype with encryption"
   compress none
   encrypt server
   server_encrypt "/usr/sbin/amcryptsimple"
}

define dumptype gui-encrypt-compress {
   gui-base
   comment "gui dumptype with compression and encryption"
   compress client fast
   encrypt server 
   server_encrypt "/usr/sbin/amcryptsimple"
}
