vzdump : Unknown option: –dumpdir

zecas

Member
Dec 11, 2019
51
5
13
Hi,

I'm trying to make a full backup of a VM to an usb drive, but somehow I'm getting an unexpected error about the parameters being used.

So I've started by mounting the usb drive, setting an ext4 fs, mount it to /mnt/usb and creating the folder /mnt/usb/vm.backups where I'll be storing the backups.

Then for the backup, when I try to run the following command, I get the error bellow:

Code:
# vzdump 100 --mode stop -–dumpdir /mnt/usb/vm.backups --compress gzip –-prune-backups keep-last=0
Unknown option: –dumpdir
400 unable to parse option
vzdump {<vmid>} [OPTIONS]
#

My intention is to make a manual backup to an USB drive, and not having that backup registered in the VM list of backups. It's just a simple full backup that I will test importing into another PVE instance for test purposes. I have no backup on that VM, so I set –prune-backups keep-last=0 thinking that it will help me force my "don't-keep-backup" intention (I'm not setting the usb as a directory storage for backups, just a drive where I can dump a manual backup and remove the drive afterwards).

I even tried execution without the –prune-backups keep-last=0 parameter, but the same result. Still the error about the -dumpdir parameter (single "-") is strange, as the man page lists that option:

Code:
       --dumpdir <string>
           Store resulting files to specified directory.

Guess I'm doing something wrong, still can't find a way around it. Anyone can help me identify what's wrong?


Thank you.
 
# vzdump 100 --mode stop -–dumpdir /mnt/usb/vm.backups --compress gzip –-prune-backups keep-last=0
Look again. It should be --dumpdir, not -–dumpdir ;-)


Edit: the same for "prune". That character is called "mdash" and it was probably inserted by a defect automatism like a clever conversion on copy-n-paste :-(
 
Last edited:
  • Like
Reactions: Stoiko Ivanov
Look again. It should be --dumpdir, not -–dumpdir ;-)


Edit: the same for "prune". That character is called "mdash" and it was probably inserted by a defect automatism like a clever conversion on copy-n-paste :-(

Wow! That was driving me crazy. After all the checks, the terminal showing the same visual representation of those distinct chars, only with a more close look I would find the problem after posting the message here. That was clearly a copy-paste from the documentation I was checking online. :) Thanks for pointing it up.

Just for reference, after correction I still got another error:

Code:
# vzdump 100 --mode stop --dumpdir /mnt/usb/vm.backups --compress gzip --prune-backups keep-last=0
Unknown option: prune-backups
400 unable to parse option
vzdump {<vmid>} [OPTIONS]
#

The reason was that the parameter is not available on the PVE version I'm using, it's an old version that will see all VMs migrated, hence my backup tests at the moment.

After removing that parameter, it started without a problem:

Code:
# vzdump 100 --mode stop --dumpdir /mnt/usb/vm.backups --compress gzip
INFO: starting new backup job: vzdump 100 --mode stop --compress gzip --dumpdir /mnt/usb/vm.backups
INFO: Starting Backup of VM 100 (qemu)
INFO: Backup started at 2023-01-15 20:47:34
INFO: status = stopped
INFO: update VM 100: -lock backup
INFO: backup mode: stop
INFO: ionice priority: 7
...

Thank you for your help.
 
  • Like
Reactions: UdoB

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!