It was observed that when attempting to use Veeam B&R to deploy and manage a Veeam Agent for Linux backup job, that Veeam does not display any data within those volumes when attempting to perform a file-level recovery of that backup data. Furthermore, Veeam does NOT back up any of the data on those volumes.
To effectively back up and restore the data on an OES/NSS volume, we have found the following process to be successful. While you will not be able to utilize the Veeam Explorer/File Level Recovery wizard to perform restorations of those files, the veeamconfig commands make it quick and easy to perform file-level recovery of data on OES/NSS volumes.
Build the Backup Job with the Veeam Backup & Replication console
Job Mode
Select Server type here, and agent managed.
It is critical that we build the job in Managed by agent mode; if we select the job to be managed by the backup server, we will be unable to mount the backup later in the restoration process due to file permission restrictions.
Name the job to your desire, and select the appropriate machines to be backed up. To better understand creating protection groups for your VAL servers, please refer to Veeam’s documentation here — Creating Protection Groups – Veeam Agent Management Guide.
Backup Mode
For backup mode, we will select file level backup with the option checked to backup directly from the live file system.
Objects
For objects, this is where you will select the NSS volumes in which you desire to be backed up. For this demonstration, we will specify two directories that we need to be protected.
Target
For the target location for the backup, we are using the Veeam Backup & Replication server in which we are using to build the job. This is to your desire, though for centralized backups, we recommend keeping all backups on your main backup repository.
Guest Processing
For guest processing, we want to enable Application Aware Image Processing. This will utilize the credentials configured in the protection group for the agent’s installation.
After the backup has processed, we can proceed to the next section, where we will restore files from the CLI of the machine in which we are protecting.
Restoring Files and Folders on Linux protected by the Veeam Agent for Linux (VAL)
The following text was excerpted from the Veeam Agent for Linux 5.0 official documentation, which can be viewed here — Restoring Files and Folders with Command Line Interface – Veeam Agent for Linux User Guide
If some files and folders on your computer get lost or corrupted, you can restore them from backups. For file-level restore, you can use backups of any type:
- Volume-level backups (backups of the entire computer or specific volumes)
- File-level backups
When you perform file-level restore, Veeam Agent publishes the backup content directly into the computer file system. You can browse to files and folders in the backup, restore files and folders to their initial location, copy files and folders to a new location or simply target applications to restored files and work with them as usual.
With the Veeam Agent command line interface, you can restore files and folders in a more flexible way than with the use of the File Level Restore wizard. In particular, you can specify a directory in which Veeam Agent should mount the backup file content for file-level restore. You can also mount several backups to different directories to work with files and folders restored from different backups simultaneously.
Before You Begin
Before you begin the file-level restore process, check the following prerequisites:
- The backup from which you plan to restore data must be successfully created at least once.
- [For backups stored in network shared folders, on Veeam backup repositories and Veeam Cloud Connect repositories] You must have access to the target location where the backup file resides.
- [For Veeam backup repository targets] If you plan to restore data from a backup stored on a backup repository, you must have access permissions on this backup repository.
- This is why we chose the Agent managed job and wrote the backup to the Veeam Backup Server to prevent permissions issues when restoring.
- [For backups of Btrfs file system] A machine on which you perform file-level restore must run the same or later Linux kernel version as the machine on which the backup was created.
- For example, you created a backup of a machine that runs Linux kernel version 4.14. If you perform file-level restore from this backup on another machine that runs Linux kernel 2.6, the file-level restore process will fail.
Step 1. Locate Backup
To view a list of backups created by Veeam Agent, use the following command:
veeamconfig backup list --all
In the list of backups, Veeam Agent displays information about all Veeam Agent for Linux backups stored in all backup repositories. If Veeam Agent is connected to a Veeam backup server, all Veeam Agent for Linux backups that are kept on Veeam backup repositories managed by this server also appear in this list.
The –all parameter is optional. If you do not use this option, Veeam Agent displays information about backups created by the current Veeam Agent computer only.
For security reasons, if you work with Veeam Agent connected to a Veeam backup server as a member of a protection group for pre-installed Veeam Agents, the veeamconfig backup list –all command will display backups created only by the current Veeam Agent computer with the current connection settings.
For each backup, Veeam Agent displays the following information:
Parameter
Description
Job name
Host name of the computer on which the backup job was configured and name of the job by which the backup was created.
Backup ID
ID of the backup.
Repository
Name of the backup repository in which the backup was created. Imported backups are marked as Imported in the Repository column.
Created at
Date and time of the backup creation.
For example:
Step 2. Explore Backup Content
For file-level restore, you can use backups of any type:
- Volume-level backups (backups of the entire computer or specific volumes)
- File-level backups
To view detailed information about specific backup, use the following command:
veeamconfig backup show --id <backup_id>
where:
<backup_id> — ID of the backup for which you want to view detailed information.
For a volume-level backup, Veeam Agent for Linux displays the following information:
Parameter
Description
Machine name
Host name of the computer on which the backup job was configured and name of the job by which the backup was created.
Name
Name of the volume in the backup.
Device
Path to the block device that represents the volume
FS UUID
File system ID
Offset
Position of the volume on the computer disk
Size
Size of the volume in the backup
For a file-level backup, Veeam Agent for Linux displays the following information:
Parameter
Description
Machine name
Host name of the machine on which the backup job is configured and the name of the job.
Backed up
Backup scope for the file-level backup job
For example:
user@srv01:~$ veeamconfig backup show --id ea64a7e5-038a-4c86-970a-6d59d4cf3968
Machine name: srv01 DocumentsBackup
File-level backup
Backed up:
/home/user/Documents
Step 3: Mount Backup
To mount a backup for file-level restore, use the following command:
veeamconfig backup mount --id <backup_id> --mountdir <path>
where:
<backup_id> — ID of the backup that you want to mount to the computer file system for file-level restore.
<path> — path to the directory to which you want to mount the backup file content.
For example:
user@srv01:~$ veeamconfig backup mount --id ea64a7e5-038a-4c86-970a-6d59d4cf3968 --mountdir /mnt/backup
Backup is mounted.
Session ID: [{2a313184-32d0-4d3a-a1b0-2eebac986047}].
Logs stored in: [/var/log/veeam/Mount/Session_{2a313184-32d0-4d3a-a1b0-2eebac986047}].
Step 4. Monitor Mount Process and Result
You can monitor the backup mount process by viewing the mount session log in the command line interface.
To view Veeam Agent session log, use the following command:
veeamconfig session log --id <session_id>
where:
<session_id> — ID of the backup mount session.
For example:
user@srv01:~$ veeamconfig session log --id 2a313184-32d0-4d3a-a1b0-2eebac986047
2016-11-22 17:30:34 UTC {30878c82-27d0-45dc-ab21-6f27d5082fd4} [info] Job started at 2016-11-22 20:30:34
2016-11-22 17:30:34 UTC {714b21d0-0d20-486e-b1e5-22d5fb5a8ee9} [info] Mounting restore point
2016-11-22 17:30:35 UTC {d331f038-5b7c-4549-85cf-5e1b54dbaf71} [info] Restore point has been mounted
Step 5. Save Restored Files
When the backup file content is mounted to the computer file system, you can use Linux command line utilities or preferred file browser to work with restored files and folders. You can browse for files and folders in the mounted backup and copy files and folders that you want to restore to their initial location or to a new location.
In the following example, the restored file Report1.pdf is copied from the mounted backup to a new location with the Linux command line utilities:
user@srv01:~$ ls Documents/
Reports
user@srv01:~$ ls /mnt/backup/FileLevelBackup_0/home/user/Documents/Reports/
Report1.pdf Report2.pdf
user@srv01:~$ cp /mnt/backup/FileLevelBackup_0/home/user/Documents/Reports/Report1.pdf Documents/
user@srv01:~$ ls Documents/
Report1.pdf Reports
Step 6. Stop Backup Mount Session
When Veeam Agent mounts a backup for file-level restore, Veeam Agent starts a new backup mount session. After you have finished working with restored files and folders, you can stop the backup mount session to unmount the backup.
To stop the backup mount session, use the following command:
veeamconfig session stop --id <session_id>
where:
<session_id> — ID of the backup mount session that you want to stop.
Veeam Agent will stop the mount session and unmount the backup from the computer file system. For example:
user@srv01:~$ veeamconfig session stop --id 2a313184-32d0-4d3a-a1b0-2eebac986047
Session has stopped.
user@srv01:~$ ls /mnt
user@srv01:~$