AIX6 JFS2 - Internal Snapshot:
Snapshot:
Taking a backup of your filesystem in a single pointing time and how quickly we can recover.
Create a 1GB file system under rootvg with internal snapshot option as "yes" as follows,
# crfs -v jfs2 -g rootvg -a size=1G -a isnapshot=yes -m /green
# mount /green
# cd /green
# vi file1 <--- Enter some lines here and save
# vi file2 <--- Enter some lines here and save
# ls -l --> make sure the files are there
run the command to create a snapshot of the filesystem
"/usr/sbin/snapshot -o snapfrom='/green' -n 'Snap1'
(or)
open the pconsole of the machine and follow the below screen shots
# cd /green
# cd .snapshot/
# ls -l --> Here you can see the directory Snap1
# cd Snap1
# ls -l --> you can see the file1 and file2 are available here too
You can delete the files (file1 and file2) from /green and restore them from /green/.snapshot/Snap1
# cd /green
# rm file1 file2
# cd /green/.snapshot/Snap1
# cp file1 file2 /green
Note: You can't remove the snapshot files (/green/.snapshot/Snap1) directly since it is "Read-only file system"
# snapshot -d -n Snap1 /green --> Please careful while running this command.
No comments:
Post a Comment