Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Rsnapshot not excluding the files that I specified in exclude_file.

Config file

config_version  1.2
snapshot_root   /home/xxx/Backups/test/
cmd_cp  /bin/cp
cmd_rm  /bin/rm
cmd_rsync   /usr/bin/rsync
cmd_ssh /usr/bin/ssh
cmd_logger  /usr/bin/logger
cmd_du  /usr/bin/du
interval    hourly  6
interval    daily   7
interval    weekly  4
interval    monthly 3
verbose 2
loglevel    4
logfile /home/xxx/Desktop/local.log
exclude_file    /home/xxx/Desktop/local-exclude.txt
#rsync_long_args --delete --numeric-ids --delete-excluded
#lockfile   /var/run/
backup_script   /home/xxx/Desktop/  mysql/
backup  /var/www/dev/   test/
rsync_short_args    -avvv


exclude downloader/*
exclude var/*

rsnapshot log file

[19/Apr/2012:11:42:44] /usr/bin/rsnapshot -c local-rsnapshot.conf hourly: started
[19/Apr/2012:11:42:44] Setting locale to POSIX "C"
[19/Apr/2012:11:42:44] mkdir -m 0755 -p /home/xxx/Backups/test/hourly.0/
[19/Apr/2012:11:42:44] mkdir -m 0755 -p /home/xxx/Backups/test/tmp/
[19/Apr/2012:11:42:44] cd /home/xxx/Backups/test/tmp/
[19/Apr/2012:11:42:44] /home/xxx/Desktop/
[19/Apr/2012:11:42:46] cd /home/xxx/Backups/test/
[19/Apr/2012:11:42:46] sync_if_different("/home/xxx/Backups/test/tmp/", "/home/xxx/Backups/test/hourly.0/mysql/")
[19/Apr/2012:11:42:46] /bin/rm -rf /home/xxx/Backups/test/tmp/
[19/Apr/2012:11:42:46] /usr/bin/rsync -avvv --delete --numeric-ids --relative --delete-excluded --exclude-from=/home/xxx/Desktop/local-exclude.txt /var/www/dev /home/xxx/Backups/test/hourly.0/test/
[19/Apr/2012:11:43:24] Some files and/or directories in /var/www/dev/ only transferred partially during rsync operation
[19/Apr/2012:11:43:24] touch /home/xxx/Backups/test/hourly.0/
[19/Apr/2012:11:43:24] WARNING: /usr/bin/rsnapshot -c local-rsnapshot.conf hourly: completed, but with some warnings

Any idea on what could be wrong?

share|improve this question

1 Answer 1

The problem is you used the rsync syntax in the exclude file whereas exclude patterns or globs are expected.

Quoting from rsnapshot(1):

exclude_file /path/to/exclude/file

This gets passed directly to rsync using the --exclude-from directive. See the rsync(1) man page for the syntax.

And rsync(1) says:


This option is related to the --exclude option, but it specifies a FILE that contains exclude patterns (one per line). Blank lines in the file and lines starting with ’;’ or ’#’ are ignored. If FILE is -, the list will be read from standard input.

This is an example from my exclude_file:


Since you are excluding by path, I would suggest putting a rsync-filter in the appropriate directories, e.g. this is what I have in my home:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.