Replicated files can be restored to the original VAST Cluster or to a different active VAST Cluster that is not the original the data was originally replicated.
All complete restore points on all active S3 replication peers 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.
Note
Reading latency might be high, since the data is being read from the remote S3 target.
Each VAST cluster maintains a user database which maps its own internal VAST IDs to external user IDs such as NFS UIDs. When files are replicated, this user ID mapping is also replicated. This enables the destination cluster to authorize permissions based on the external (access protocol's) user IDs that are replicated in the mapping table.
In order to ensure that file permissions are authorized correctly, the destination cluster must be configured to fetch user entries from the same authorization provider as the source cluster. If users are local to the clusters, make sure that the local users match each other. If needed, edit the local users on the destination cluster to be synced with the local users on the source cluster.
Files on a given restore point ("<restore point>") created by a given protected path ("<protected_path>") are found under:
.vastremote/<protected_path>/<restore point>
Restore points are named by their timestamps. The timestamp of a restore point is the point in time at which the protected path 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 15.0.0.1, so we can mount "/" onto the local directory "fs":
[centos@centos-7 data]$ sudo mount 15.0.0.1:/ fs
-
Assuming that there is at least one S3 replication peer 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 protected path:
[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 protected paths that appear here include all streams that replicated any VAST Cluster's data to any and all S3 replication peers that are currently active on the VAST Cluster.
-
Under each protected path'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 S3 replication peer directory using commands such as:
-
cp
for local copy. Add the-p
flag to preserve the file's owner, ACL and timestamp.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.
In our example:
cp -p .vastremote/Stream-1/2020-06-29_11:31:32/Projects/ProjectEFBG20/data/doc1 /Projects/ProjectEFBG20/data/doc1
-
scp
for remote copy. Again, use the-p
flag to preserve the file's owner, ACL and timestamp. -
rsync
for remote fast copy, especially useful for large files and directories. Add the-A
flag to preserve the file's owner, ACL and timestamp.
-
Comments
0 comments
Article is closed for comments.