Article Title: Use fssnap to create a file system-based snapshot. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The ufsdump command is mainly used for system backup. However, it is helpless to execute the command in single-user mode every time. A new command fssnap can actually solve this problem.
This command is released in solaris 1/01. the read-only snapshot that can be used to create a file system is different from that of ufsdump. This command does not need to be run in single-user mode. It can be executed in multi-user mode and when the file system is mounted.
Now take a snapshot of/partition first. The snapshot file is stored in the/var directory and is named root. snap.
#/Usr/sbin/fssnap-F ufs-o bs =/var/root. snap/
/Dev/fssnap/1
When you execute this command, it will create a virtual device file for Snapshot
The Snapshot created for the/usr partition is also stored in the/var directory named usr. snap.
#/Usr/sbin/fssnap-F ufs-o bs =/var/usr. snap/usr
/Dev/fssnap/0
Query Information about a file system snapshot.
# Fssnap-I
0/usr
1/
Query snapshot details
# Fssnap-I/
Snapshot number: 1
Block Device:/dev/fssnap/1
Raw Device:/dev/rfssnap/1
Mount point :/
Device state: idle
Backing store path:/var/root. snap
Backing stores size: 384 KB
Maximum backing store size: Unlimited
Snapshot create time: Thu May 13 15:11:59 2004
Copy-on-write granularity: 32 KB
Delete A Virtual Device
# Fssnap-d/
Deleted snapshot 1.
However, the corresponding snapshot file will not be deleted. If you want to delete the snapshot file while deleting the snapshot device, you must
Specify the unlink parameter when the image is taken
# Fssnap-F ufs-o bs =/var/usr. snap, unlink/usr
How to back up and restore snapshots
This is done using the ufsdump and ufsrestore commands (in this example, it is not stored on tape)
# Ufsdump 0ucf/var/usr_snap.dmp 'fssnap-F ufs-o bs =/var/usr. snap, unlink/usr'
DUMP: Writing 63 Kilobyte records
DUMP: Date of this level 0 dump: Thu May 13 15:56:50 2004
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping/dev/rfssnap/1 to/var/usr_snap.dmp.
DUMP: Mapping (Pass I) [regular files]
DUMP: Mapping (Pass II) [directories]
DUMP: Estimated 1608764 blocks (785.53 MB ).
DUMP: Dumping (Pass III) [directories]
DUMP: Dumping (Pass IV) [regular files]
DUMP: 1608640 blocks (785.47 MB) on 1 volume at 2819 KB/sec
DUMP: DUMP IS DONE
DUMP: Level 0 dump on Thu May 13 15:56:50 2004
In this way, the backup of the file system snapshot is created, and the ufsrestore command is used for recovery.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.