vzdump reports error with --exclude-path /mnt/*

Sasha

Well-Known Member
Oct 18, 2018
111
1
58
Kazahstan
Hi, guys!
I'm really in stuck with command

Code:
/usr/bin/vzdump 104 --dumpdir /root/backups --mode snapshot --compress zstd --exclude-path /mnt/*

that leads to error

Code:
400 Parameter verification failed.
vmid: invalid format - value does not look like a valid VM ID
vzdump {<vmid>} [OPTIONS]

As i wait --exclude-path /mnt/* should exclude files and direcories behind /mnt/
Would You help me to figure out that?
 
Hi, probably your shell is expanding the /mnt/* pattern, so vzdump sees some extra arguments it doesn't understand and throws the "value does not look like a valid VM ID" error. Putting the /mnt/* into single quotes should prevent the shell from expanding it:
Code:
/usr/bin/vzdump [...] --exclude-path '/mnt/*'
Alternatively, you can escape the * with a backslash (/mnt/\*).
 
Last edited:
  • Like
Reactions: Sasha