source: gpfs_3.1_ker2.6.20/share/man/man8/mmrestorefs.8 @ 16

Last change on this file since 16 was 16, checked in by rock, 16 years ago
File size: 5.4 KB
Line 
1.TH mmrestorefs 03/23/06
2mmrestorefs Command
3.SH "Name"
4.PP
5\fBmmrestorefs\fR - Restores a file system from a GPFS
6snapshot.
7.SH "Synopsis"
8.PP
9\fBmmrestorefs\fR \fIDevice\fR \fIDirectory\fR
10[\fB-c\fR]
11.SH "Description"
12.PP
13Use the \fBmmrestorefs\fR command to restore user data and attribute
14files to a file system using those of the specified snapshot.
15.PP
16Prior to issuing the \fBmmrestorefs\fR command, you must unmount the file
17system from all nodes in the cluster. The file system may not be
18remounted until the \fBmmrestorefs\fR command has successfully completed,
19unless you have specified the \fB-c\fR option to force the restore to
20continue even in the event errors are encountered. Automatic quota
21activation upon mounting the file system is \fInot\fR restored by the
22\fBmmrestorefs\fR command. You must issue the \fBmmchfs -Q yes\fR command to restore automatic quota
23activation.
24.PP
25Snapshots are not affected by the \fBmmrestorefs\fR
26command. Consequently, a failure while restoring one snapshot may
27possibly be recovered by restoring a different snapshot.
28.PP
29When the
30\fBmmsnapdir -a\fR (add a
31snapshots subdirectory to all subdirectories in the file system) option is in
32effect, the snapshots subdirectories may no longer show the complete list of
33snapshots containing the parent directory, if the file system was restored
34from a snapshot that was not the latest. Since the root directory is
35contained in all snapshots, its snapshots subdirectory will always show the
36complete list of snapshots.
37.PP
38For information on how GPFS policies and snapshots interact, see
39\fIPolicy-based data management for
40GPFS\fR in
41\fIGeneral Parallel File
42System: Advanced Administration Guide\fR.
43.PP
44Because snapshots are not copies of the entire file system, they should not
45be used as protection against media failures. For protection against
46media failures, see
47\fIGeneral Parallel File
48System: Concepts, Planning, and Installation Guide\fR and search
49on \fIrecoverability considerations\fR.
50.SH "Parameters"
51.PP
52.RS +3
53\fB\fIDevice\fR
54\fR
55.RE
56.RS +9
57The device name of the file system for which the snapshot is to be
58created. File system names need not be fully-qualified.
59\fBfs0\fR is just as acceptable as \fB/dev/fs0\fR.
60.PP
61This must be the first parameter.
62.RE
63.PP
64.RS +3
65\fB\fIDirectory\fR
66\fR
67.RE
68.RS +9
69The snapshot with which to restore the file system.
70.RE
71.SH "Options"
72.PP
73.RS +3
74\fB-c
75\fR
76.RE
77.RS +9
78Continue to restore the file system in the event errors occur.
79.PP
80Upon completion of the \fBmmrestorefs -c\fR command, the file system is
81inconsistent, but can be mounted to recover data from the snapshot. If
82necessary, the command may be issued to recover as much data as
83possible. The
84\fBmmfsck\fR command may
85be run on an inconsistent file system.
86.PP
87After the \fBmmrestorefs -c\fR command has been issued, use the
88\fBmmfsck\fR command to clean up the files or
89directories that could not be restored.
90.RE
91.SH "Exit status"
92.PP
93.PP
94.RS +3
95\fB0
96\fR
97.RE
98.RS +9
99Successful completion.
100.RE
101.PP
102.RS +3
103\fBnonzero
104\fR
105.RE
106.RS +9
107A failure has occurred.
108.RE
109.SH "Security"
110.PP
111You must have root authority to run the \fBmmrestorefs\fR
112command.
113.PP
114You may issue the \fBmmrestorefs\fR command from any node in the GPFS
115cluster.
116.PP
117When using the \fBrcp\fR and \fBrsh\fR commands for remote
118communication, a properly configured \fB.rhosts\fR file must exist
119in the root user's home directory on each node in the GPFS
120cluster. If you have designated the use of a different remote
121communication program on either the
122\fBmmcrcluster\fR
123or the
124\fBmmchcluster\fR command, you must
125ensure:
126.RS +3
127.HP 3
1281. Proper authorization is granted to all nodes in the GPFS cluster.
129.HP 3
1302. The nodes in the GPFS cluster can communicate without the use of a
131password, and without any extraneous messages.
132.RE
133.SH "Examples"
134.PP
135We have a directory structure similar to:
136.sp
137.nf
138/fs1/file1
139/fs1/userA/file2
140/fs1/userA/file3
141/fs1/.snapshots/snap1/file1
142/fs1/.snapshots/snap1/userA/file2
143/fs1/.snapshots/snap1/userA/file3
144.fi
145.sp
146.PP
147If the directory \fBuserA\fR is then deleted, we would have:
148.sp
149.nf
150/fs1/file1
151/fs1/.snapshots/snap1/file1
152/fs1/.snapshots/snap1/userA/file2
153/fs1/.snapshots/snap1/userA/file3
154.fi
155.sp
156.PP
157The directory \fBuserB\fR is then created using the inode originally
158assigned to \fBuserA\fR. We take another snapshot:
159.sp
160.nf
161mmcrsnapshot fs1 snap2
162.fi
163.sp
164.PP
165The output is similar to this:
166.sp
167.nf
168Writing dirty data to disk
169Quiescing all file system operations
170Writing dirty data to disk again
171Creating snapshot.
172Resuming operations.
173.fi
174.sp
175.PP
176After the command is issued, the directory structure would appear similar
177to:
178.sp
179.nf
180/fs1/file1
181/fs1/userB/file2b
182/fs1/userB/file3b
183/fs1/.snapshots/snap1/file1
184/fs1/.snapshots/snap1/userA/file2
185/fs1/.snapshots/snap1/userA/file3
186/fs1/.snapshots/snap2/file1
187/fs1/.snapshots/snap2/userB/file2b
188/fs1/.snapshots/snap2/userB/file3b
189.fi
190.sp
191.PP
192If the file system is then to be restored from \fBsnap1\fR:
193.sp
194.nf
195mmrestorefs fs1 snap1
196.fi
197.sp
198.PP
199After the command has been issued, the directory structure would appear
200similar to:
201.sp
202.nf
203/fs1/file1
204/fs1/userA/file2
205/fs1/userA/file3
206/fs1/.snapshots/snap1/file1
207/fs1/.snapshots/snap1/userA/file2
208/fs1/.snapshots/snap1/userA/file3
209/fs1/.snapshots/snap2/file1
210/fs1/.snapshots/snap2/userB/file2b
211/fs1/.snapshots/snap2/userB/file3b
212.fi
213.sp
214.SH "See also"
215.PP
216mmcrsnapshot Command
217.PP
218mmdelsnapshot Command
219.PP
220mmlssnapshot Command
221.PP
222mmsnapdir Command
223.SH "Location"
224.PP
225\fB/usr/lpp/mmfs/bin\fR
Note: See TracBrowser for help on using the repository browser.