Article ID: 117897, created on Oct 11, 2013, last review on Jun 3, 2014

  • Applies to:
  • Virtuozzo 6.0
  • Virtuozzo hypervisor

Symptoms

I want to know how to move containers and VM backups to some NFS share, and use this NFS share as a permanent backup storage.

Resolution

There are two ways to achieve this:

  1. change the default location for backups to the already mounted directory;
  2. use the same location as the currently configured one and mount the NFS share to this location.

The default backup location can be checked using the following commands:

  1. for PVA Agent (backups initiated from Power Panel, or from PVA Management Node):

    ~# vzabackup --view-folder localhost
    
  2. for Parallels Dispatcher (prlctl backup):

    ~# prlsrvctl info | grep ^Backup
    

How to change the default location for backups to the already mounted directory

To change the location of backups to the already mounted NFS resource, the following commands can be used:

    ~# vzabackup --set-folder --backup-folder-path /path/to/NFS_share localhost
    ~# prlsrvctl set --backup-path /path/to/NFS_share

(Replace /path/to/NFS_share with the actual full path to the directory.)

Currently existing backups can be moved to the above mentioned resource manually. After moving existing backups to the new location, run the command vzabackup --set-folder ... once again to let PVA Agent know about moved backups.

    ~# mv --target-directory /path/to/NFS_share /vz/backups/*
    ~# mv --target-directory /path/to/NFS_share /vz/vmprivate/backups/*
    ~# vzabackup --set-folder --backup-folder-path /path/to/NFS_share localhost

How to use the same location as the currently configured one and mount the NFS share to this location

To achieve it, nothing specific is required, you only need to move backups from the current location to NFS share and remount NFS share to the backup location.

The detailed steps are below:

  1. before you start moving backups - make sure there are no active backups running to this host (we need /vz/vmprivate/backups/ to stay unchanged while we move it's contents);
  2. rename the directory with backups and recreate the directory, mount NFS resource to this newly created directory:

    ~# mv /vz/vmprivate/backups{,~temp}
    ~# mkdir /vz/vmprivate/backups
    ~# mount -t nfs $nfs_server:$nfs_share /vz/vmprivate/backups
    

    (Replace $nfs_server and $nfs_share with the actual values.)

  3. move all contents of /vz/vmprivate/backups~temp/ to /vz/vmprivate/backups/:

    ~# mv --target-directory /vz/vmprivate/backups /vz/vmprivate/backups~temp/*
    
  4. once moving is completed and the directory /vz/vmprivate/backups~temp/ is empty, it can be removed:

    ~# rm -r /vz/vmprivate/backups~temp
    
  5. for PVA Agent backups (moving /vz/backups/ to the NFS server), let PVA Agent know the changes:

    ~# vzabackup --set-folder --backup-folder-path /vz/backups localhost
    
  6. add the proper record for the NFS share to be mounted to /vz/vmprivate/backups/ (or /vz/backups/) in the file /etc/fstab;
  7. make sure /etc/fstab has proper settings for all defined mounts by executing the following command:

    ~# mount -a
    

Search Words

backups

location

nfs

How can i mount a USB drive on Hardware node

Acronis Error: Module=0 Code=0, Tag=0, .Module=0 Code=0, Tag=0

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 c62e8726973f80975db0531f1ed5c6a2 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF