vzdump:tldr:f65de
vzdump: Use snapshot mode (no downtime required) and a non-default dump directory.
$ vzdump ${vm_id} --dumpdir ${path-to-directory} --mode ${snapshot}
try on your machine
This command is used to take a backup of a virtual machine (VM) using the vzdump tool. Here is an explanation of the different components of the command:
vzdump
: This is the command to run the vzdump tool.${vm_id}
: This variable should be replaced with the ID or name of the virtual machine you want to backup. It identifies the specific VM to backup.--dumpdir ${path-to-directory}
: This option specifies the path to the directory where the backup file will be stored.${path-to-directory}
should be replaced with the actual path on your system.--mode ${snapshot}
: This option determines the backup mode.${snapshot}
should be replaced with the desired mode, which can be full, stop, suspend, or lvm. Each mode corresponds to a different way of creating backups:- Full: Takes a full backup, regardless of the VM's power state.
- Stop: Stops the VM during the backup process.
- Suspend: Suspends the VM during the backup process.
- LVM: Uses LVM snapshot to create the backup, which minimizes downtime.
Put together, this command will initiate a vzdump backup of the specified virtual machine, saving the backup file to the specified directory, using the chosen backup mode.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.