Article ID: 118233, created on Oct 27, 2013, last review on Jun 3, 2015

  • Applies to:
  • Virtuozzo 6.0
  • Virtuozzo containers for Linux
  • Virtuozzo containers for Windows
  • Virtual Automation


How do I restore files or directories from a container's backup selectively using the command line?


NOTE: A selective restore can be completed by overwriting files using the copy from the backup. If files from a backup are also to be restored, rename or move the existing files to safe place and then restore the data.

NOTE2: Since the selective restore overwrites existing files, it can only be completed when the original container exists on the node. As a result, the --files option is incompatible with the -e option.

The following command can be used for a selective restore:

    # vzarestore CTID/CThostname --files <files_to_restore> -b BackupId --storage BackupStorage

For example:

  1. If you need to restore the /etc folder for container #556:

    # vzlist 101
          CTID      NPROC STATUS    IP_ADDR         HOSTNAME
           101         19 running   -               test
  2. You can list the available backups for the container to confirm the backup ID you want to use:

    # vzarestore -l -f -e 101
    Show existing backups...
    CTID: 101
    Title: testct
    Type:  full
    BackupID: 7147dc27-3d25-a34f-a5a3-3d457389d3e7/20131023193528
    Parent environment:
    Size: 277.96 Mb
    Creation date: 2013-10-24T023528+0007
    CTID: 101
    Title: testct
    Type:  incremental
    BackupID: 7147dc27-3d25-a34f-a5a3-3d457389d3e7/20131023193714
    Parent environment:
    Size: 1002.05 Kb
    Creation date: 2013-10-24T023714+0007

    Note: if the backup is located on another node, the command should be as follows (specifying the hostname or IP of the backup node):

    # vzarestore -l -f -e 101 --storage
    Login to root's password:
    Show existing backups...
    CTID: 101
    Title: testct
    Type:  full
    BackupID: 7147dc27-3d25-a34f-a5a3-3d457389d3e7/20131008083001
    Parent environment:
    Size: 278.05 Mb
    Creation date: 2013-10-08T153001+0007
  3. If you want to restore the /etc folder from a full backup located on the local node, use this command:

    # vzarestore 101 --files /etc -b 7147dc27-3d25-a34f-a5a3-3d457389d3e7/20131023193528

    To restore the files from another node, add the option --storage with the correct server's name:

    # vzarestore 101 --files /etc -b 7147dc27-3d25-a34f-a5a3-3d457389d3e7/20131008083001 --storage

Search Words

selective restore



windows restore file does not work


c62e8726973f80975db0531f1ed5c6a2 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f 319940068c5fa20655215d590b7be29b 965b49118115a610e93635d21c5694a8

Email subscription for changes to this article
Save as PDF