3 fossilcons \- fossil console commands
341 These are configuration and maintenance commands
342 executed at the console of a
345 The commands are split into three groups above:
346 file server configuration,
347 file system configuration,
348 and file system maintenance.
349 This manual page is split in the same way.
350 .SS File server configuration
358 treating each line as a command to be executed.
359 Blank lines and lines beginning with a
361 character are ignored.
362 Errors during execution are printed but do not stop the script.
365 is a file in the name space in which
369 a file in any file system served by
373 executes a 9P transaction; the arguments
374 are in the same format used by
380 It is useful when fossil
381 is started without devices it needs configured
385 toggles the debug flag and prints the new setting.
386 When the debug flag is set, all protocol messages
387 and information about authentication is printed to
391 behaves identically to
393 writing to the console.
396 manages the network addresses at which
400 prints the current list of addresses and their network directories.
401 With one argument, listen
403 starts a new listener at
409 to remove the listener
410 at the given address.
413 is only allowed to attach on a connection after
414 at least one other user has successfully attached.
417 flag allows connections from
424 to check the IP address of incoming connections
427 rejecting attaches from disallowed addresses.
428 This mechanism is not intended for general use.
430 .I sources.cs.bell-labs.com
431 uses it to comply with U.S. crytography
435 prints the maximum internal 9P message queue size
436 and the maximum number of 9P processes to
437 allocate for serving the queue.
442 options set the two variables.
447 line for each configured file system
450 line, if any, used to configure this file server.
453 behaves like listen but uses
455 rather than a network address.
460 edits a list of console services rather than 9P services.
463 prints the current list of services.
464 With one argument, srv
466 starts a new service at
472 to remove the named service.
475 command below for a description of the
480 manipulates entries in the user table.
481 There is no distinction between users and groups:
482 a user is a group with one member.
483 For each user, the user table records:
488 the string used to represent this user in the on-disk structures
491 the string used to represent this user in the 9P protocol
494 the group's leader (see Plan 9's
496 for a description of the special privileges held by a group leader)
499 a comma-separated list of members in this group
505 are usually the same string, but need not be.
508 is used in file system structures archived to Venti,
509 it is impossible to change those disk structures,
510 and thus impossible to rename the
516 allows the appearance of renaming the user even
517 though the on-disk structures still record the old name.
518 (In a conventional Unix file system, the
520 is stored as a small integer rather than a string.)
526 The first argument to
531 The second argument is a verb, one of:
536 create a user with name
540 also create a home directory
541 .BI /active/usr/ uname \fR
544 create a user with name
548 but do not create a home directory
555 throughout the user table
567 group leader; then all members will be
584 If the verb is omitted, the entire entry for
586 is printed, in the form
587 `\fIid\fL:\fIname\fL:\fIleader\fL:\fImembers\fR.'
589 The end of this manual page gives examples.
592 manipulates the user table.
593 The user table is a list of lines in the form printed
599 flag resets the user table with the default:
606 glenda:glenda:glenda:
611 these users are mandatory: they must appear in all user
612 files and cannot be renamed.
616 flag reads a user table from the named
622 flag writes the table to
629 will be created if they do not exist.
634 is automatically executed when the file system
640 is automatically executed after each change to the user
646 prints a list of users attached to each active connection.
647 .SS File system configuration
649 sets the current file system to
651 which must be configured and open (q.v.).
652 The current file system name is
653 displayed as the file server prompt.
656 stands for all file systems;
659 are applied to each file system in turn.
670 takes as an optional argument
673 a command to execute on the named file system.
674 Most commands require that the named file system
675 be configured and open; these commands can be invoked
678 prefix, in which case the current file system is used.
684 operate on unopened file systems; they require the prefix.
687 creates a new file system named
691 This just adds an entry to fossil's internal table.
700 option will be used instead;
703 configuration file to avoid naming the partition that it is embedded in,
704 making it more portable.
707 establishes a connection to the Venti server
709 (by default, the environment variable
711 or the network variable
713 for use by the named file system.
716 command is issued before
718 the default Venti server will be used.
719 If the file system is open,
720 and was not opened with the
723 the command redials the Venti server.
724 This can be used to reestablish broken connections.
725 It is not a good idea to use the command to switch
726 between Venti servers, since Fossil does not keep track
727 of which blocks are stored on which servers.
730 opens the file system, reading the
731 root and super blocks and allocating an in-memory
732 cache for disk and Venti blocks.
738 run with no authentication
741 run with no permission checking
744 do not attempt to connect to a Venti server
747 allow wstat to make arbitrary changes to the user and group fields
750 do not update file access times;
751 primarily to avoid wear on flash memories
754 open the file system read-only
757 allocate an in-memory cache of
764 settings can be overridden on a per-connection basis
770 flushes all dirty file system blocks to disk
771 and then closes the device file.
774 removes the named file system (which must be closed)
775 from fossil's internal table.
778 .SS File system maintenance
780 marks the block at disk address
782 as available for allocation.
783 Before doing so, it prints a
786 that can be used to restore the block to its previous state.
789 displays (in hexadecimal)
790 the contents of the block at disk address
796 bytes or until the end of the block.
800 is given, the contents in that range are
802 When writing to a block,
804 prints the old and new contents,
805 so that the change is easily undone.
806 Editing blocks is discouraged.
809 zeros an entry from a disk block.
810 Before doing so, it prints a
812 command that can be used
813 to restore the entry.
816 removes the internal directory entry
817 and abandons storage associated with
819 It ignores the usual rules for sanity, such as checking against
820 removing a non-empty directory.
825 will identify the abandoned storage so it can be reclaimed with
830 zeros a pointer in a disk block.
831 Before doing so, it prints a
833 command that can be used to restore the entry.
836 checks the file system for various inconsistencies.
837 If the file system is not already halted, it is halted for
838 the duration of the check.
839 If the archiver is currently sending a snapshot to Venti,
840 the check will refuse to run; the only recourse is to wait
841 for the archiver to finish.
843 A list of keyword options control the check.
851 to print the name of each block, directory, or file encountered.
855 reports errors but does not fix them.
862 options specify correcting actions that may be taken:
863 closing leaked blocks, clearing bad file directory entries,
864 clearing bad pointers, and clearing bad entries.
867 option enables all of these; it is equivalent to
875 scans the portion of the active file system held in the write buffer,
876 avoiding blocks stored on Venti or used only in snapshots.
881 to scan the portion of the file system stored on Venti,
886 to scan old snapshots.
900 to take a very long time.
903 creates a file on the current file system.
910 see the discussion above, in the description
915 is the low 9 bits of the permission mode of the file,
923 set the append-only, directory, and lock bits.
926 is formatted as described in the
929 creating files or directories with the
931 bit set is not allowed.
934 prints the amount of used disk space in the write buffer.
937 sets the low file system epoch.
938 Snapshots in the file system are given increasing epoch numbers.
939 The file system maintains a low and a high epoch number,
940 and only allows access to snapshots in that range.
941 The low epoch number can be moved forward to discard old snapshots
942 and reclaim the disk space they occupy.
943 (The high epoch number is always the epoch of the currently
948 reports the current low and high epoch numbers.
951 is used to propose changing the low epoch to
959 for snapshots that would be discarded, printing their
960 epoch numbers and the
962 commands necessary to remove them.
963 The epoch is changed only if no such paths are found.
964 The usual sequence of commands is (1) run epoch to
965 print the snapshots and their epochs, (2) clri some snapshots,
967 If the file system is completely full (there are no free blocks),
969 may fail because it needs to allocate blocks.
973 flag to epoch forces the epoch change even when
974 it means discarding currently accessible snapshots.
975 Note that when there are still snapshots in
977 the archiver should take care
978 of those snapshots (moving the blocks from disk to Venti)
979 if you give it more time.
983 flag to epoch causes it to remove any now-inaccessible
984 snapshot directories once it has changed the epoch.
985 This flag only makes sense in conjunction with the
990 is a very low-level way to retire snapshots.
991 The preferred way is by setting an automatic timer
996 suspends all file system activity;
1001 displays and edits the label associated with a block.
1002 When editing, a parameter of
1004 means leave that field unchanged.
1005 Editing labels is discouraged.
1012 takes a temporary snapshot of the current file system,
1014 .BI /snapshot/ yyyy / mmdd / hhmm \fR,
1021 to take an archival snapshot, recording it in
1022 .BI /archive/ yyyy / mmdd \fR,
1025 By default the snapshot is taken of
1027 the root of the active file system.
1030 flag specifies a different source path.
1033 flag specifies a different destination path.
1034 These two flags are useful together for moving snapshots into
1038 immediately discards all snapshots that are more than
1041 The default timeout is the one set by the
1044 The discarding is a one-time event rather than
1045 a recurring event as in
1049 displays and edits the times at which snapshots are automatically
1051 An archival snapshot is taken once a day, at
1053 while temporary snapshots are taken at multiples of
1056 Temporary snapshots are discarded after they are
1059 The snapshot cleanup runs every
1061 minutes or once a day, whichever is more frequent,
1062 so snapshots may grow to an age of almost twice the timeout
1063 before actually being discarded.
1066 prints the current snapshot times.
1071 options set the archive and snapshot times.
1078 can be used to disable that kind of automatic snapshot.
1081 option sets the snapshot timeout.
1086 temporary snapshots are not automatically discarded.
1087 By default, all three times are set to
1091 displays metadata for each of the named
1096 stat \fIfile elem uid gid perm length
1103 yields a valid command.)
1106 is an octal number less than or equal to 777,
1107 prefixed with any of the following letters
1108 to indicate additional bits.
1115 s \fRis the root of a snapshot
1117 A \fRMS-DOS archive bit
1119 H \fRMS-DOS hidden bit
1121 S \fRMS-DOS system bit
1126 The bits denoted by capital letters are included
1127 to support non-Plan 9 systems.
1128 They are not made visible by the 9P protocol.
1131 writes dirty blocks in memory to the disk.
1134 prints the Venti score for a
1136 archive containing the tree rooted
1139 which must already be archived to Venti
1142 is a directory in the
1147 changes the metadata of the named
1151 for any of the fields means ``don't change.''
1152 Attempts to change the
1158 are silently ignored.
1161 the Plan 9 distribution file server,
1162 uses the following configuration file:
1165 srv -p fscons.sources
1166 srv -p fscons.sources.adduserd
1168 fsys main config /dev/sdC0/fossil.outside
1169 fsys main open -c 25600
1171 users /active/adm/users
1174 snaptime -a 0000 -s 15
1177 The second console is used by the daemon
1178 that creates new accounts.
1180 To add a new user with
1185 and create his home directory:
1191 To create a new group
1193 (with no home directory)
1203 To save an old (but not yet discarded) snapshot into the archive tree:
1206 snap -a -s /snapshot/2003/1220/0700 -d /archive/2003/1220