File restoration requires an active VAST Cluster. It does not need to be the same VAST Cluster from which the data was originally replicated.
All complete restore points on all active replication targets on a VAST Cluster are exposed via a hidden virtual directory that reads the data from the remote targets. This directory is called .vastremote. The .vastremote directory can be accessed via a client mount of an NFS export of the top level of the cluster's file system ("/"). Files on the restore points are read-only and can be copied from .vastremote to the VAST Cluster.
Reading latency might be high, since the data is being read from the remote S3 target.
Files on a given restore point ("<restore point>") created by a given stream ("<stream>") are found under:
Restore points are named by their timestamps. The timestamp of a restore point is the point in time at which the replication stream took a snapshot before beginning to copy data from that point in time.
On an NFS client machine, mount an export of the top level of the file system, '/' if not already mounted. One of the VAST Cluster's CNode VIPs is 18.104.22.168, so we can mount "/" onto the local directory "fs":
[centos@centos-7 data]$ sudo mount 22.214.171.124:/ fs
Assuming that there is at least one replication target that is defined and active on the VAST Cluster that we are accessing, we can list the content of .vastremote as if it were within the mounted "/". Under .vastremote, we can see a directory for each replication stream:
[centos@centos-7 fs]$ ll -htr .vastremote total 0 drwxrwxrwx. 1 root root 4.0K June 29 2020 Stream-1 drwxrwxrwx. 1 root root 4.0K June 29 2020 Stream-2
The streams that appear here include all streams that replicated any VAST Cluster's data to any and all targets that are currently active on the VAST Cluster.
Under each stream's directory, you can find the restore points, named by their timestamps:
[centos@centos-7 fs]$ ll -htr .vastremote/Stream-1/ total 0 drwxrwxrwx. 2 root root 4.0K Jun 29 05:58 2020-06-29_14:01:33 drwxrwxrwx. 2 root root 4.0K Jun 29 05:58 2020-06-29_13:31:32 drwxrwxrwx. 2 root root 4.0K Jun 29 05:58 2020-06-29_13:01:33 drwxrwxrwx. 2 root root 4.0K Jun 29 05:58 2020-06-29_12:31:33 drwxrwxrwx. 2 root root 4.0K Jun 29 05:58 2020-06-29_12:01:33 drwxrwxrwx. 2 root root 4.0K Jun 29 05:58 2020-06-29_11:31:32 drwxrwxrwx. 2 root root 4.0K Jun 29 05:58 2020-06-29_11:01:52
Under each restore point, you can see the replicated directories and files:
[centos@centos-7 fs]$ ll -htr .vastremote/Stream-1/2020-06-29_11:31:32/Projects/ProjectEFBG20/data total 0 -rw-rw-r--. 1 centos centos 0 Jun 29 15:34 doc1 -rw-rw-r--. 1 centos centos 0 Jun 29 15:34 doc2 -rw-rw-r--. 1 centos centos 0 Jun 29 15:34 doc3
You can copy each individual file out of the replication target directory. We will use the
cpcommand, with the
-pflag to preserve the file's owner, ACL and timestamp:
cp -p .vastremote/Stream-1/2020-06-29_11:31:32/Projects/ProjectEFBG20/data/doc1 /Projects/ProjectEFBG20/data/doc1
If the file had been deleted from the original directory, this command will restore the file by creating the file and copying the replicated file content to the newly created file. If the file had been changed and not deleted, this command will overwrite the changed file with the backup version from the restore point.