|
Lines 437-448
Link Here
|
| 437 |
<secondary>Snapshots</secondary> |
437 |
<secondary>Snapshots</secondary> |
| 438 |
</indexterm> |
438 |
</indexterm> |
| 439 |
|
439 |
|
| 440 |
<para>FreeBSD 5.0 offers a new feature in conjunction with the |
440 |
<para>FreeBSD 5.0 offers a new feature in conjunction with |
| 441 |
<option>softupdates</option> option. File system snapshots.</para> |
441 |
<link linkend="soft-updates">Soft Updates</link>: File system snapshots.</para> |
| 442 |
|
442 |
|
| 443 |
<para>Snapshots allow a user to create an image of specified file |
443 |
<para>Snapshots allow a user to create an image of specified file |
| 444 |
systems and treat this image as a file. The -u (or update) flag |
444 |
systems and treat this image as a file. |
| 445 |
in &man.mount.8; is required with this option. |
|
|
| 446 |
Snapshot files must be created in the file system that the |
445 |
Snapshot files must be created in the file system that the |
| 447 |
action is performed on, and a user may create no more than 20 |
446 |
action is performed on, and a user may create no more than 20 |
| 448 |
snapshots per file system. Active snapshots are recorded |
447 |
snapshots per file system. Active snapshots are recorded |
|
Lines 453-464
Link Here
|
| 453 |
however all the used space may not be acquired as another snapshot will |
452 |
however all the used space may not be acquired as another snapshot will |
| 454 |
possibly claim some of the blocks that were released.</para> |
453 |
possibly claim some of the blocks that were released.</para> |
| 455 |
|
454 |
|
| 456 |
<para>During initial creation, the schg flag (see &man.chflags.1; manual page) |
455 |
<para>During initial creation, the <option>schg</option> flag (see &man.chflags.1; manual page) |
| 457 |
is set on to ensure that not even root can write to the snapshot. |
456 |
is set on to ensure that not even <username>root</username> can write to the snapshot. |
| 458 |
The &man.unlink.1; command makes an exception for snapshot files, |
457 |
The &man.unlink.1; command makes an exception for snapshot files, |
| 459 |
however, in which it allows them to be removed even |
458 |
however, in which it allows them to be removed even |
| 460 |
though they have the schg flag set, so it is not necessary to |
459 |
though they have the <option>schg</option> flag set, so it is not necessary to |
| 461 |
clear the schg flag before removing a snapshot file.</para> |
460 |
clear the <option>schg</option> flag before removing a snapshot file.</para> |
|
|
461 |
|
| 462 |
<para>Snapshots are created with the &man.mount.8; command. To place |
| 463 |
a snapshot of <filename>/var</filename> in the file |
| 464 |
<filename>/var/snapshot/snap</filename> use the following |
| 465 |
command:</para> |
| 466 |
|
| 467 |
<screen>&prompt.root; <userinput>mount -u -o snapshot /var/snapshot/snap /var</userinput></screen> |
| 462 |
|
468 |
|
| 463 |
<para>Once a snapshot has been created, there are several interesting |
469 |
<para>Once a snapshot has been created, there are several interesting |
| 464 |
things that an administrator can do with them:</para> |
470 |
things that an administrator can do with them:</para> |
|
Lines 483-489
Link Here
|
| 483 |
file system as the timestamp of the snapshot.</para> |
489 |
file system as the timestamp of the snapshot.</para> |
| 484 |
|
490 |
|
| 485 |
<warning><para>As of this writing &man.dump.8; has not yet |
491 |
<warning><para>As of this writing &man.dump.8; has not yet |
| 486 |
been changed to set the dumpdates file correctly, so |
492 |
been changed to set the <filename>dumpdates</filename> file correctly, so |
| 487 |
do not use this feature in production until that fix |
493 |
do not use this feature in production until that fix |
| 488 |
is made.</para></warning> |
494 |
is made.</para></warning> |
| 489 |
</listitem> |
495 |
</listitem> |