Mountable data Storage Checkpoints on a consistent and undamaged file system can be used by backup and restore applications to restore either individual files or an entire file system. Restoration from Storage Checkpoints can also help recover incorrectly modified files, but typically cannot recover from hardware damage or other file system integrity problems.
Note For hardware or other integrity problems, Storage Checkpoints must be supplemented by backups from other media.
Files can be restored by copying the entire file from a mounted Storage Checkpoint back to the primary fileset. To restore an entire file system, you can designate a mountable data Storage Checkpoint as the primary fileset using the fsckpt_restore
command.
See the fsckpt_restore
(1M) manual page.
When using the fsckpt_restore
command to restore a file system from a Storage Checkpoint, all changes made to that file system after that Storage Checkpoint's creation date are permanently lost. The only Storage Checkpoints and data preserved are those that were created at the same time, or before, the selected Storage Checkpoint's creation. The file system cannot be mounted when fsckpt_restore
is invoked.
Note
Files can be restored very efficiently by applications using the fsckpt_fbmap
(3) library function to restore only modified portions of a files data.
The following example restores a file, MyFile.txt
, which resides in your home directory, from the Storage Checkpoint "CKPT1" to the device /dev/vx/dsk/vol-01
. The mount point for the device is /home
.
To restore a file from a Storage Checkpoint
$ mount -F vxfs -o ckpt=CKPT1 /dev/vx/dsk/dg1/vol- \
01:CKPT1/home/checkpoints/mar_4
/home/checkpoints/mar_4/users/me
directory, which contains the image of your home directory.
$ cd /home/checkpoints/mar_4/users/me
-rw-r--r-- 1 me staff 14910 Mar 4 17:09 MyFile.txt
$ cp MyFile.txt /home/users/me
-rw-r--r-- 1 me staff 14910 Mar 4 18:21 MyFile.txt
The following example restores a file system from the Storage Checkpoint "CKPT3." The filesets listed before the restoration show an unnamed root fileset and six Storage Checkpoints.
Click the thumbnail above to view full-sized image.
To restore a file system from a Storage Checkpoint
# fsckpt_restore -l /dev/vx/dsk/dg1/vol2
ctime = Thu 08 May 2004 06:28:26 PM PST
mtime = Thu 08 May 2004 06:28:26 PM PST
flags = largefiles, file system root
ctime = Thu 08 May 2004 06:28:35 PM PST
mtime = Thu 08 May 2004 06:28:35 PM PST
ctime = Thu 08 May 2004 06:28:34 PM PST
mtime = Thu 08 May 2004 06:28:34 PM PST
ctime = Thu 08 May 2004 06:28:33 PM PST
mtime = Thu 08 May 2004 06:28:33 PM PST
ctime = Thu 08 May 2004 06:28:36 PM PST
mtime = Thu 08 May 2004 06:28:36 PM PST
ctime = Thu 08 May 2004 06:28:30 PM PST
mtime = Thu 08 May 2004 06:28:30 PM PST
ctime = Thu 08 May 2004 06:28:29 PM PST
mtime = Thu 08 May 2004 06:28:29 PM PST
Select Storage Checkpoint for restore operation
or <Return> to list Storage Checkpoints: CKPT3
ctime = Thu 08 May 2004 06:28:31 PM PST
mtime = Thu 08 May 2004 06:28:36 PM PST
UX:vxfs fsckpt_restore: WARNING: V-3-24640: Any file system
changes or Storage Checkpoints made after
Thu 08 May 2004 06:28:31 PM PST will be lost.
Restore the file system from Storage Checkpoint CKPT3 ?
UX:vxfs fsckpt_restore: INFO: V-3-23760: File system
If the filesets are listed at this point, it shows that the former UNNAMED root fileset and CKPT6, CKPT5, and CKPT4 were removed, and that CKPT3 is now the primary fileset. CKPT3 is now the fileset that will be mounted by default.
Click the thumbnail above to view full-sized image.
# fsckpt_restore -l /dev/vx/dsk/dg1/vol2
ctime = Thu 08 May 2004 06:28:31 PM PST
mtime = Thu 08 May 2004 06:28:36 PM PST
flags = largefiles, file system root
ctime = Thu 08 May 2004 06:28:30 PM PST
mtime = Thu 08 May 2004 06:28:30 PM PST
ctime = Thu 08 May 2004 06:28:29 PM PST
mtime = Thu 08 May 2004 06:28:29 PM PST
Select Storage Checkpoint for restore operation
or <Return> to list Storage Checkpoints: