| 1 | .TH mmrestorefs 03/23/06 |
|---|
| 2 | mmrestorefs Command |
|---|
| 3 | .SH "Name" |
|---|
| 4 | .PP |
|---|
| 5 | \fBmmrestorefs\fR - Restores a file system from a GPFS |
|---|
| 6 | snapshot. |
|---|
| 7 | .SH "Synopsis" |
|---|
| 8 | .PP |
|---|
| 9 | \fBmmrestorefs\fR \fIDevice\fR \fIDirectory\fR |
|---|
| 10 | [\fB-c\fR] |
|---|
| 11 | .SH "Description" |
|---|
| 12 | .PP |
|---|
| 13 | Use the \fBmmrestorefs\fR command to restore user data and attribute |
|---|
| 14 | files to a file system using those of the specified snapshot. |
|---|
| 15 | .PP |
|---|
| 16 | Prior to issuing the \fBmmrestorefs\fR command, you must unmount the file |
|---|
| 17 | system from all nodes in the cluster. The file system may not be |
|---|
| 18 | remounted until the \fBmmrestorefs\fR command has successfully completed, |
|---|
| 19 | unless you have specified the \fB-c\fR option to force the restore to |
|---|
| 20 | continue even in the event errors are encountered. Automatic quota |
|---|
| 21 | activation 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 |
|---|
| 23 | activation. |
|---|
| 24 | .PP |
|---|
| 25 | Snapshots are not affected by the \fBmmrestorefs\fR |
|---|
| 26 | command. Consequently, a failure while restoring one snapshot may |
|---|
| 27 | possibly be recovered by restoring a different snapshot. |
|---|
| 28 | .PP |
|---|
| 29 | When the |
|---|
| 30 | \fBmmsnapdir -a\fR (add a |
|---|
| 31 | snapshots subdirectory to all subdirectories in the file system) option is in |
|---|
| 32 | effect, the snapshots subdirectories may no longer show the complete list of |
|---|
| 33 | snapshots containing the parent directory, if the file system was restored |
|---|
| 34 | from a snapshot that was not the latest. Since the root directory is |
|---|
| 35 | contained in all snapshots, its snapshots subdirectory will always show the |
|---|
| 36 | complete list of snapshots. |
|---|
| 37 | .PP |
|---|
| 38 | For information on how GPFS policies and snapshots interact, see |
|---|
| 39 | \fIPolicy-based data management for |
|---|
| 40 | GPFS\fR in |
|---|
| 41 | \fIGeneral Parallel File |
|---|
| 42 | System: Advanced Administration Guide\fR. |
|---|
| 43 | .PP |
|---|
| 44 | Because snapshots are not copies of the entire file system, they should not |
|---|
| 45 | be used as protection against media failures. For protection against |
|---|
| 46 | media failures, see |
|---|
| 47 | \fIGeneral Parallel File |
|---|
| 48 | System: Concepts, Planning, and Installation Guide\fR and search |
|---|
| 49 | on \fIrecoverability considerations\fR. |
|---|
| 50 | .SH "Parameters" |
|---|
| 51 | .PP |
|---|
| 52 | .RS +3 |
|---|
| 53 | \fB\fIDevice\fR |
|---|
| 54 | \fR |
|---|
| 55 | .RE |
|---|
| 56 | .RS +9 |
|---|
| 57 | The device name of the file system for which the snapshot is to be |
|---|
| 58 | created. File system names need not be fully-qualified. |
|---|
| 59 | \fBfs0\fR is just as acceptable as \fB/dev/fs0\fR. |
|---|
| 60 | .PP |
|---|
| 61 | This must be the first parameter. |
|---|
| 62 | .RE |
|---|
| 63 | .PP |
|---|
| 64 | .RS +3 |
|---|
| 65 | \fB\fIDirectory\fR |
|---|
| 66 | \fR |
|---|
| 67 | .RE |
|---|
| 68 | .RS +9 |
|---|
| 69 | The 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 |
|---|
| 78 | Continue to restore the file system in the event errors occur. |
|---|
| 79 | .PP |
|---|
| 80 | Upon completion of the \fBmmrestorefs -c\fR command, the file system is |
|---|
| 81 | inconsistent, but can be mounted to recover data from the snapshot. If |
|---|
| 82 | necessary, the command may be issued to recover as much data as |
|---|
| 83 | possible. The |
|---|
| 84 | \fBmmfsck\fR command may |
|---|
| 85 | be run on an inconsistent file system. |
|---|
| 86 | .PP |
|---|
| 87 | After the \fBmmrestorefs -c\fR command has been issued, use the |
|---|
| 88 | \fBmmfsck\fR command to clean up the files or |
|---|
| 89 | directories 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 |
|---|
| 99 | Successful completion. |
|---|
| 100 | .RE |
|---|
| 101 | .PP |
|---|
| 102 | .RS +3 |
|---|
| 103 | \fBnonzero |
|---|
| 104 | \fR |
|---|
| 105 | .RE |
|---|
| 106 | .RS +9 |
|---|
| 107 | A failure has occurred. |
|---|
| 108 | .RE |
|---|
| 109 | .SH "Security" |
|---|
| 110 | .PP |
|---|
| 111 | You must have root authority to run the \fBmmrestorefs\fR |
|---|
| 112 | command. |
|---|
| 113 | .PP |
|---|
| 114 | You may issue the \fBmmrestorefs\fR command from any node in the GPFS |
|---|
| 115 | cluster. |
|---|
| 116 | .PP |
|---|
| 117 | When using the \fBrcp\fR and \fBrsh\fR commands for remote |
|---|
| 118 | communication, a properly configured \fB.rhosts\fR file must exist |
|---|
| 119 | in the root user's home directory on each node in the GPFS |
|---|
| 120 | cluster. If you have designated the use of a different remote |
|---|
| 121 | communication program on either the |
|---|
| 122 | \fBmmcrcluster\fR |
|---|
| 123 | or the |
|---|
| 124 | \fBmmchcluster\fR command, you must |
|---|
| 125 | ensure: |
|---|
| 126 | .RS +3 |
|---|
| 127 | .HP 3 |
|---|
| 128 | 1. Proper authorization is granted to all nodes in the GPFS cluster. |
|---|
| 129 | .HP 3 |
|---|
| 130 | 2. The nodes in the GPFS cluster can communicate without the use of a |
|---|
| 131 | password, and without any extraneous messages. |
|---|
| 132 | .RE |
|---|
| 133 | .SH "Examples" |
|---|
| 134 | .PP |
|---|
| 135 | We 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 |
|---|
| 147 | If 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 |
|---|
| 157 | The directory \fBuserB\fR is then created using the inode originally |
|---|
| 158 | assigned to \fBuserA\fR. We take another snapshot: |
|---|
| 159 | .sp |
|---|
| 160 | .nf |
|---|
| 161 | mmcrsnapshot fs1 snap2 |
|---|
| 162 | .fi |
|---|
| 163 | .sp |
|---|
| 164 | .PP |
|---|
| 165 | The output is similar to this: |
|---|
| 166 | .sp |
|---|
| 167 | .nf |
|---|
| 168 | Writing dirty data to disk |
|---|
| 169 | Quiescing all file system operations |
|---|
| 170 | Writing dirty data to disk again |
|---|
| 171 | Creating snapshot. |
|---|
| 172 | Resuming operations. |
|---|
| 173 | .fi |
|---|
| 174 | .sp |
|---|
| 175 | .PP |
|---|
| 176 | After the command is issued, the directory structure would appear similar |
|---|
| 177 | to: |
|---|
| 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 |
|---|
| 192 | If the file system is then to be restored from \fBsnap1\fR: |
|---|
| 193 | .sp |
|---|
| 194 | .nf |
|---|
| 195 | mmrestorefs fs1 snap1 |
|---|
| 196 | .fi |
|---|
| 197 | .sp |
|---|
| 198 | .PP |
|---|
| 199 | After the command has been issued, the directory structure would appear |
|---|
| 200 | similar 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 |
|---|
| 216 | mmcrsnapshot Command |
|---|
| 217 | .PP |
|---|
| 218 | mmdelsnapshot Command |
|---|
| 219 | .PP |
|---|
| 220 | mmlssnapshot Command |
|---|
| 221 | .PP |
|---|
| 222 | mmsnapdir Command |
|---|
| 223 | .SH "Location" |
|---|
| 224 | .PP |
|---|
| 225 | \fB/usr/lpp/mmfs/bin\fR |
|---|