VZDUMP add hostname

korkutefe

Member
Oct 2, 2018
3
0
6
36
Hi,

I want to write hostname to backup file when I get backup.

As a result of my research I always found old scripts.

Can you help me with this?
 
For QEMU based VM, this is impossible. The hostname depends on the internal settings which cannot be retrieved.

You can, however, show the configuration of the VM and this includes the name you've given:

upload_2018-10-2_20-56-45.png
 
Thank you.

I am getting a backup of a different file path through crontab and I am not using the interface.

For example:
vzdump 102 --node vm --dumpdir /backup /Antispam --mode snapshot --compress gzip --maxfiles 7

This command line is now separated by file names, but I want to add a hostname in the resulting backup.

Is it possible?