📜 ⬆️ ⬇️

Veeam Backup: nice little tricks

On the eve of the New Year, I thought: not to make a modest, but very useful gift to our readers, talking about features that the system administrators and users of Veeam Backup & Replication usually don’t pay attention to, and don’t even know about some of them? So this article was born on how to use Veeam Backup in a non-standard way.

I will start, perhaps, with many well-known VeeamZIP.


')

VeeamZIP


VeeamZIP is a free backup tool.

In the free Veeam Backup Free Edition, it is possible to backup only one VM in one pass of VeeamZIP, in the paid version of Veeam Backup & Replication VeeamZIP has no limitations. As a result of VeeamZIP operation, a file is obtained that contains a complete copy of the backup VM. The VeeamZIP operation is started manually from the interface (on the Virtual Machines tab - see the screenshot below), by the PowerShell cmdlet ( Help , story on habr ) or from the vSphere Web Client (if the plug-in with Veeam Backup Enterprise Manager is installed).

The main purpose of VeeamZIP is to create an independent portable backup once.



When may need:
  1. Archiving old VMs; test or decommissioned service. In this case, do VeeamZIP-file and delete the VM in production.
  2. Transfer / send VM to the developer in order to test on his stand; a full copy is required for subsequent replication setup (seeding); it is necessary to transfer the prepared VMs to the branches or hand them over to the contractors / for inspection, to safety officers, etc., etc.
  3. Saving different variants of VMs, for example, different versions of software (as in a joke: “Here is the skeleton of Alexander the Great when he was five years old ... But the skeleton of a seven-year-old Macedonian ...”).
  4. Creating an unscheduled copy before the changes, if Quick Backup is not suitable - for example, the task states to store 3 daily restore points, and you need to keep the copy for a longer period.
  5. Come up with your option.

A nice bonus: you can set the backup retention period on the disk. If you don’t take it anywhere, Veeam Backup will remove it.



Quick migration


The Quick Migration feature is available in the free version. In paid Veeam Backup & Replication, it is used to migrate a VM, after a restore operation by running directly from a backup - Instant VM Recovery , in case, for example, VMware Storage vMotion is impossible. You can also start this operation from the Virtual Machines tab.

But after all, no one forbids using this function for the usual transfer of the VM in a working environment! No doubt, Storage vMotion is good because it transfers VM disks without stopping their work, but it negatively affects the performance of the main storage system at the moment of migration. And Quick Migration works similarly to replication in Veeam Backup & Replication, and the effect on storage is much less [I’ll mark myself that I need to check if I / O Control works during this operation], but the VM will be unavailable for some time (downtime will take place at the time of entering the VM into a pause, transfer of extraneous blocks and bringing the machine out of a pause). So here you have a choice: either regular demanding svMotion without stopping, or Veeam Quick Migration with less impact on productive, but suspension in work.

In general, the Virtual Machines tab is a very useful section.

Virtual Machines tab


Here you can easily find the necessary VMs and, by clicking on the right mouse button, add them to existing tasks or create new ones with them. This is often simpler and clearer than opening an assignment for editing each time and adding new VMs to backup through its properties.



Did you miss the FastSCP?


Who remembers Veeam FastSCP for VMware? Once it was the only good way to copy data to datastores, for example, if it is ISO-shniki or ready-made VM, disk images. The console scp copied very slowly, and FastSCP was really fast and free. Then he was abolished in favor of the free edition of Veeam Backup. But! The copy function has been and remains in Veeam Backup & Replication.

So, let's go to the Files tab in the console (do you open it at all, tell me honestly? No? Well, in vain!). There we will be able to find the necessary files on any of the servers registered in the Veeam console: VMware, Linux, Windows (including Hyper-V hosts, of course) - and copy them anywhere within the same registered servers via Copy-Paste or Drag'n ' Drop. (Note, and from Linux to Windows, and vice versa is also possible.)



In addition, you can copy and schedule - using job File Copy Job. Although there is no explicit execution of the deferred one-time execution, it is possible to solve this bypassing maneuver - via the command line and the Windows scheduler:
  1. Create a job to copy File Copy Job without including the schedule for execution.
  2. On the final screen of the wizard, copy the command line to complete the task.



    Useful: the same lines are for other types of tasks.
  3. Go to the Windows scheduler and create a new task for a one-time execution, specify the desired time and paste the copied line from step 2.



The process of copying itself, if we talk about Windows / Linux, comes from within the OS. So feel free to add physical hosts to the Veeam Backup & Replication console when you need to copy something from / to them too.

Copying takes place as is, that is, without compression and deduplication. Want to compress files for archiving? Probably then tapes would be best. They have built-in archiving, while Veeam Backup & Replication has tape integration and its own job type File to Tape Job.

And about the bookmark Files


There is a built-in text editor on this tab!



And he understands text files in Unix format:



So if you need to edit a vmx file (VM configuration on VMware platform) or any other configuration file inside Linux (and Windows too), you can safely use this tool. The command “Save” will save the file in the same place where it was opened (that is, you don’t need to copy it to your disk, edit it and then upload it back).

Tricks with vPower


Let me remind those who do not know, and tell those who have forgotten.

vPower is a Veeam technology designed to gain access to VM data in a backup, without the need to completely retrieve (unzip and rehydrate all data back). It builds on the Veeam Instant VM Recovery feature to quickly restore access to a crashed VM, as well as other features, including virtual labs, file recovery for “other OS” (not Windows), etc.

The VMware vSphere platform uses its built-in NFS server (vPower NFS). The principle of its operation is as follows. Veeam Backup & Replication registers with the ESXi host a new NFS storage. Then, when restoring a VM, it extracts small VM files from the backup - vmx, nvram and others. In this case, instead of disk files (vmdk), files are created link to them. Next, Veeam Backup registers the VM in vSphere and gives the command to load it (if the corresponding option is enabled). When the hypervisor accesses the VM disk file for a data block, Veeam Backup & Replication removes the necessary block from the backup and gives it to the hypervisor. This is how the VM is loaded and then running from the backup.

And how else can this be used, if not to start the VM? Well, for example, for the presentation of a disk to a VM in another machine. In this use case, you need to remember a few points:
  1. During recovery (be sure to restore to a new location, you do not want to overwrite the existing VM!) DO NOT enable the Connect VM to network and Power on VM automatically options.
  2. After the recovery process is completed, the current state in the log will be designated as Waiting for user to start migration .
  3. In the vSphere console to the desired running VM, start adding a new disk.
  4. Choose an existing one.
  5. Find the desired disk presented from the backup VM on the datastore [VeeamBackup_ <server_name>].
  6. And confirm its addition.
  7. Inside the VM, initialize, if necessary, and use this disk.
  8. Profit!

A few more important notes:

In this tricky way, you can quickly restore disk access and use it instead of restoring a separate vmdk disk with a connection to another VM. You know that in Veeam Backup there is such a way to restore (restore and connect as a new SCSI disk), right?

What else can be done with vPower NFS? Go ahead!

Here you have the ball


Usually, VeeamBackup NFS is added once per ESXi host when performing the above operations. When repeated operations, it is checked that this connection exists, and if you manually delete this connection (unmount datastore), Veeam Backup & Replication reconnects it. (Veeam Backup itself doesn’t delete it voluntarily, in order to save time during the next process.) It doesn’t make much sense to disconnect it, and being connected, it can help you in other cases. So, it can be used as (suddenly!) NFS orb :) For example, you can put an ISO-shnik there or migrate VMs between ESXi hosts that are not connected by a shared storage.

Convenient: migrate the folder for vPower NFS to a convenient, accessible for you place on the repository server (the default location is in %ProgramData% ).



Then it will be easier to put something into this folder on the Windows machine side. And you can also share the folder - for convenient access from the outside. (Here is the idea: to check how VMware Workstation will work with such a disk.)

Connect NFS to all hosts - this can be done manually by running the Instant VM Recovery recovery process on each host, and then canceling the restore (personally, this is not very convenient for me, especially with a large number of hosts). Another option is to add NFS with server data in the VMware console on each host, as shown here (but this is also done manually):



You can do the same through the New-Datastore (from powercli ). For example, like this:
 Get-VMHost | New-Datastore -Nfs -Name VeeamBackup_vbr.domain.local -Path "/VeeamBackup_vbr.domain.local" -NfsHost vbr.domain.local 

Well, if you want to delete all NFS datastores left over from Veeam Backup & Replication, then there is a script for this purpose.

And instead of the conclusion - pre-Christmas wish


Sometimes we don’t even think that the software we use every day has capabilities that we don’t pay attention to - and they can help us in other, not quite “our” everyday tasks.

Everyone knows that in system administration most of the time routine tasks are taken away. Think about how to automate them with the help of the tools that you already have at hand, and you will surely find how to use the available programs for their not entirely direct purpose. Think, so to speak, different ...

Source: https://habr.com/ru/post/273757/


All Articles