vzdump --exclude-path not working for "snapshot"

shadowq

Renowned Member
Mar 12, 2013
32
2
73
Hi there,

I've got a read/write error with a few files with my software raid, and I'm a little bit too nervous at the moment to take it down to repair the raid. So I'd like to get a full CT backup before doing anything drastic with the host.

I've stumbled over --exclude-path, and thought I could use it for the two directories that have the problem files (/tmp, and /var/spool/exim/msglog/o/). However, when using --exclude-path in snapshot mode, it seemed to ignore my second directory (/var/spool/exim/msglog/o/) or something. Here's the command that is being run-

ERROR: Backup of VM 102 failed - command '(cd /mnt/vzsnap0/private/102;find . '(' -regex '^\.$' ')' -o '(' -type 's' -prune ')' -o '(' -regex './tmp/' -prune ')' -o '(' -regex './var/spool/exim/msglog/o/' -prune ')' -o -print0|sed 's/\\/\\\\/g'|tar cpf - --totals --sparse --numeric-owner --no-recursion --one-file-system --null -T -|cstream -t 5242880|lzop) >/backup/dump/vzdump-openvz-102-2016_03_19-14_20_49.tar.dat' failed: interrupted by signal

I'm trying it in suspend mode to see if rsync plays nicely with my --exclude-path option. Perhaps I am entering it wrong? Here's my vzdump command-

INFO: starting new backup job: vzdump 102 --quiet 1 --remove 1 --mailto ***** --mode snapshot --exclude-path /tmp/ --exclude-path /var/spool/exim/msglog/o/ --compress lzo --maxfiles 2 --storage OVH

Thanks,
Jarrod.
 
Last edited:
A little more info. When trying snapshot, with the paths apparently excluded (as seen in above), I'm still getting these errors:

INFO: find: `./var/spool/exim/msglog/o/1Y4EPo-0005wL-5r': Input/output error (which to me, says that the pruning isn't working?).

It's now almost finished the rsync (suspend mode) and it seems it is excluding those paths correctly. I'd much rather use snapshot though.