View Full Version : How to exclude files/folder from backup for Windows clients?

December 18th, 2012, 01:04 AM

Ive been looking at the wiki guides and i cant find a clear explanation of how to exclude files and folders from backup on a Windows client backup.

For example.. i am backing up C:\ and i want to exclude C:\users\ and *.avi files from backup. How would i achieve this?

Ive seen the linux explanation for this but i cant find a clear explanation for Windows.

Thanks in advance,


December 21st, 2012, 02:08 AM
You put the exclusions in the Windows dumptype you're using in amanda.conf on the Amanda server (also specify the dumptype in the disklist file as the third field of course). For example, your dumptype might look like this (I've included our global def too because I change that):

define dumptype global {
comment "Global definitions"
index yes
record yes
compress none
compress client fast
encrypt server
server_encrypt "/usr/sbin/amcrypt-ossl"
server_decrypt_option "-d"
auth "bsdtcp"
maxpromoteday 0

define dumptype windows {
program "DUMP"
estimate server
exclude "C:\\users" "*.avi"

and the DLE entry in the disklist file on the Amanda server for the host "backupclient" would be (yes, forward slashes here):

backupclient C:/ windows

Things to note:

* The global def includes compressing on the client and encrypting on the server, so remember to keep your .am_passphrase file safe (i.e. a copy of it saved on another server) - without that file, you can't recover anything and don't just only backup the dir its in on the Amanda server without a second copy elsewhere ...you still won't be able to decrypt the dump if the server dies!. It also turns off inc -> full promotion (we force our fulls twice a week - 50% of disks on a Tue, 50% on a Fri), which you may not want to do - remove the maxpromoteday line if that's the case.
* I believe there's an "exclude append" version that allows you to split expressions across multiple lines, but I've not used it.
* "estimate server" is used by me because "estimate client" (the default!) is appallingly slow on Amanda windows clients (and yet much, much faster on Linux clients) and sadly there is no "estimate calcsize" support on the Windows clients.
* Yes, double backslashes are needed for each original backslash in the exclude expressions before you ask.