3 fossilcons \- fossil console commands
339 These are configuration and maintenance commands
340 executed at the console of a
343 The commands are split into three groups above:
344 file server configuration,
345 file system configuration,
346 and file system maintenance.
347 This manual page is split in the same way.
348 .SS File server configuration
356 treating each line as a command to be executed.
357 Blank lines and lines beginning with a
359 character are ignored.
360 Errors during execution are printed but do not stop the script.
363 is a file in the name space in which
367 a file in any file system served by
371 executes a 9P transaction; the arguments
372 are in the same format used by
378 It is useful when fossil
379 is started without devices it needs configured
383 toggles the debug flag and prints the new setting.
384 When the debug flag is set, all protocol messages
385 and information about authentication is printed to
389 behaves identically to
391 writing to the console.
394 manages the network addresses at which
398 prints the current list of addresses and their network directories.
399 With one argument, listen
401 starts a new listener at
407 to remove the listener
408 at the given address.
411 is only allowed to attach on a connection after
412 at least one other user has successfully attached.
415 flag allows connections from
422 to check the IP address of incoming connections
425 rejecting attaches from disallowed addresses.
426 This mechanism is not intended for general use.
428 .I sources.cs.bell-labs.com
429 uses it to comply with U.S. crytography
433 prints the maximum internal 9P message queue size
434 and the maximum number of 9P processes to
435 allocate for serving the queue.
440 options set the two variables.
445 line for each configured file system
448 line, if any, used to configure this file server.
451 behaves like listen but uses
453 rather than a network address.
458 edits a list of console services rather than 9P services.
461 prints the current list of services.
462 With one argument, srv
464 starts a new service at
470 to remove the named service.
473 command below for a description of the
478 manipulates entries in the user table.
479 There is no distinction between users and groups:
480 a user is a group with one member.
481 For each user, the user table records:
484 the string used to represent this user in the on-disk structures
487 the string used to represent this user in the 9P protocol
490 the group's leader (see
492 for a description of the special privileges held by a group leader)
495 a comma-separated list of members in this group
501 are usually the same string, but need not be.
504 is used in file system structures archived to Venti,
505 it is impossible to change those disk structures,
506 and thus impossible to rename the
512 allows the appearance of renaming the user even
513 though the on-disk structures still record the old name.
514 (In a conventional Unix file system, the
516 is stored as a small integer rather than a string.)
522 The first argument to
527 The second argument is a verb, one of:
530 create a user with name
534 also create a home directory
535 .BI /active/usr/ uname \fR
538 create a user with name
542 but do not create a home directory
549 throughout the user table
561 group leader; then all members will be
578 If the verb is omitted, the entire entry for
580 is printed, in the form
581 `\fIid\fL:\fIname\fL:\fIleader\fL:\fImembers\fR.'
583 The end of this manual page gives examples.
586 manipulates the user table.
587 The user table is a list of lines in the form printed
593 flag resets the user table with the default:
600 glenda:glenda:glenda:
605 these users are mandatory: they must appear in all user
606 files and cannot be renamed.
610 flag reads a user table from the named
616 flag writes the table to
623 will be created if they do not exist.
628 is automatically executed when the file system
634 is automatically executed after each change to the user
640 prints a list of users attached to each active connection.
641 .SS File system configuration
643 sets the current file system to
645 which must be configured and open (q.v.).
646 The current file system name is
647 displayed as the file server prompt.
650 stands for all file systems;
653 are applied to each file system in turn.
664 takes as an optional argument
667 a command to execute on the named file system.
668 Most commands require that the named file system
669 be configured and open; these commands can be invoked
672 prefix, in which case the current file system is used.
678 operate on unopened file systems; they require the prefix.
681 creates a new file system named
685 This just adds an entry to fossil's internal table.
688 establishes a connection to the Venti server
690 (by default, the environment variable
692 or the network variable
694 for use by the named file system.
697 command is issued before
699 the default Venti server will be used.
700 If the file system is open,
701 and was not opened with the
704 the command redials the Venti server.
705 This can be used to reestablish broken connections.
706 It is not a good idea to use the command to switch
707 between Venti servers, since Fossil does not keep track
708 of which blocks are stored on which servers.
711 opens the file system, reading the
712 root and super blocks and allocating an in-memory
713 cache for disk and Venti blocks.
717 run with no authentication
720 run with no permission checking
723 do not attempt to connect to a Venti server
726 allow wstat to make arbitrary changes to the user and group fields
729 open the file system read-only
732 allocate an in-memory cache of
739 settings can be overridden on a per-connection basis
745 flushes all dirty file system blocks to disk
746 and then closes the device file.
749 removes the named file system (which must be closed)
750 from fossil's internal table.
751 .SS File system maintenance
753 marks the block at disk address
755 as available for allocation.
756 Before doing so, it prints a
759 that can be used to restore the block to its previous state.
762 displays (in hexadecimal)
763 the contents of the block at disk address
769 bytes or until the end of the block.
773 is given, the contents in that range are
775 When writing to a block,
777 prints the old and new contents,
778 so that the change is easily undone.
779 Editing blocks is discouraged.
782 zeros an entry from a disk block.
783 Before doing so, it prints a
785 command that can be used
786 to restore the entry.
789 removes the internal directory entry
790 and abandons storage associated with
792 It ignores the usual rules for sanity, such as checking against
793 removing a non-empty directory.
798 will identify the abandoned storage so it can be reclaimed with
803 zeros a pointer in a disk block.
804 Before doing so, it prints a
806 command that can be used to restore the entry.
809 checks the file system for various inconsistencies.
810 If the file system is not already halted, it is halted for
811 the duration of the check.
812 If the archiver is currently sending a snapshot to Venti,
813 the check will refuse to run; the only recourse is to wait
814 for the archiver to finish.
816 A list of keyword options control the check.
824 to print the name of each block, directory, or file encountered.
828 reports errors but does not fix them.
835 options specify correcting actions that may be taken:
836 closing leaked blocks, clearing bad file directory entries,
837 clearing bad pointers, and clearing bad entries.
840 option enables all of these; it is equivalent to
848 scans the portion of the active file system held in the write buffer,
849 avoiding blocks stored on Venti or used only in snapshots.
854 to scan the portion of the file system stored on Venti,
859 to scan old snapshots.
873 to take a very long time.
876 creates a file on the current file system.
883 see the discussion above, in the description
888 is the low 9 bits of the permission mode of the file,
896 set the append-only, directory, and lock bits.
899 is formatted as described in the
902 creating files or directories with the
904 bit set is not allowed.
907 prints the amount of used disk space in the write buffer.
910 sets the low file system epoch.
911 Snapshots in the file system are given increasing epoch numbers.
912 The file system maintains a low and a high epoch number,
913 and only allows access to snapshots in that range.
914 The low epoch number can be moved forward to discard old snapshots
915 and reclaim the disk space they occupy.
916 (The high epoch number is always the epoch of the currently
921 reports the current low and high epoch numbers.
924 is used to propose changing the low epoch to
932 for snapshots that would be discarded, printing their
933 epoch numbers and the
935 commands necessary to remove them.
936 The epoch is changed only if no such paths are found.
937 The usual sequence of commands is (1) run epoch to
938 print the snapshots and their epochs, (2) clri some snapshots,
940 If the file system is completely full (there are no free blocks),
942 may fail because it needs to allocate blocks.
946 flag to epoch forces the epoch change even when
947 it means discarding currently accessible snapshots.
948 Note that when there are still snapshots in
950 the archiver should take care
951 of those snapshots (moving the blocks from disk to Venti)
952 if you give it more time.
956 flag to epoch causes it to remove any now-inaccessible
957 snapshot directories once it has changed the epoch.
958 This flag only makes sense in conjunction with the
963 is a very low-level way to retire snapshots.
964 The preferred way is by setting an automatic timer
969 suspends all file system activity;
974 displays and edits the label associated with a block.
975 When editing, a parameter of
977 means leave that field unchanged.
978 Editing labels is discouraged.
985 takes a temporary snapshot of the current file system,
987 .BI /snapshot/ yyyy / mmdd / hhmm \fR,
994 to take an archival snapshot, recording it in
995 .BI /archive/ yyyy / mmdd \fR,
998 By default the snapshot is taken of
1000 the root of the active file system.
1003 flag specifies a different source path.
1006 flag specifies a different destination path.
1007 These two flags are useful together for moving snapshots into
1011 immediately discards all snapshots that are more than
1014 The default timeout is the one set by the
1017 The discarding is a one-time event rather than
1018 a recurring event as in
1022 displays and edits the times at which snapshots are automatically
1024 An archival snapshot is taken once a day, at
1026 while temporary snapshots are taken at multiples of
1029 Temporary snapshots are discarded after they are
1032 The snapshot cleanup runs every
1034 minutes or once a day, whichever is more frequent,
1035 so snapshots may grow to an age of almost twice the timeout
1036 before actually being discarded.
1039 prints the current snapshot times.
1044 options set the archive and snapshot times.
1051 can be used to disable that kind of automatic snapshot.
1054 option sets the snapshot timeout.
1059 temporary snapshots are not automatically discarded.
1060 By default, all three times are set to
1064 displays metadata for each of the named
1069 stat \fIfile elem uid gid perm length
1076 yields a valid command.)
1079 is an octal number less than or equal to 777,
1080 prefixed with any of the following letters
1081 to indicate additional bits.
1088 s \fRis the root of a snapshot
1090 A \fRMS-DOS archive bit
1092 H \fRMS-DOS hidden bit
1094 S \fRMS-DOS system bit
1099 The bits denoted by capital letters are included
1100 to support non-Plan 9 systems.
1101 They are not made visible by the 9P protocol.
1104 writes dirty blocks in memory to the disk.
1107 prints the Venti score for a
1109 archive containing the tree rooted
1112 which must already be archived to Venti
1115 is a directory in the
1120 changes the metadata of the named
1124 for any of the fields means ``don't change.''
1125 Attempts to change the
1131 are silently ignored.
1134 the Plan 9 distribution file server,
1135 uses the following configuration file:
1138 srv -p fscons.sources
1139 srv -p fscons.sources.adduserd
1141 fsys main config /dev/sdC0/fossil.outside
1142 fsys main open -c 25600
1144 users /active/adm/users
1147 snaptime -a 0000 -s 15
1150 The second console is used by the daemon
1151 that creates new accounts.
1153 To add a new user with
1158 and create his home directory:
1164 To create a new group
1166 (with no home directory)
1176 To save an old (but not yet discarded) snapshot into the archive tree:
1179 snap -a -s /snapshot/2003/1220/0700 -d /archive/2003/1220