1 6f4d00ee 2013-09-23 0intro .TH FOSSILCONS 8
3 6f4d00ee 2013-09-23 0intro fossilcons \- fossil console commands
4 6f4d00ee 2013-09-23 0intro .SH SYNOPSIS
6 6f4d00ee 2013-09-23 0intro con /srv/fscons
13 6f4d00ee 2013-09-23 0intro .I T-message
18 6f4d00ee 2013-09-23 0intro .B -b|-a|-c|-bc|-ac
39 6f4d00ee 2013-09-23 0intro .I address
52 6f4d00ee 2013-09-23 0intro .B printconfig
67 6f4d00ee 2013-09-23 0intro .BI % newname
69 6f4d00ee 2013-09-23 0intro .BI = leader
71 6f4d00ee 2013-09-23 0intro .BI + member
73 6f4d00ee 2013-09-23 0intro .BI - member
111 6f4d00ee 2013-09-23 0intro .B -APVWar
115 6f4d00ee 2013-09-23 0intro .I ncache
126 6f4d00ee 2013-09-23 0intro .B unconfig
142 6f4d00ee 2013-09-23 0intro .I offset
157 6f4d00ee 2013-09-23 0intro .B pblock
163 6f4d00ee 2013-09-23 0intro .B bclose
175 6f4d00ee 2013-09-23 0intro .B snapshot
184 6f4d00ee 2013-09-23 0intro .I offsets
201 6f4d00ee 2013-09-23 0intro .I offset
208 6f4d00ee 2013-09-23 0intro .B create
247 6f4d00ee 2013-09-23 0intro .I epochclose
255 6f4d00ee 2013-09-23 0intro .B remove
280 6f4d00ee 2013-09-23 0intro .B snapclean
282 6f4d00ee 2013-09-23 0intro .I timeout
289 6f4d00ee 2013-09-23 0intro .B snaptime
296 6f4d00ee 2013-09-23 0intro .I interval
300 6f4d00ee 2013-09-23 0intro .I timeout
308 6f4d00ee 2013-09-23 0intro .IR files ...
320 6f4d00ee 2013-09-23 0intro .B unhalt
339 6f4d00ee 2013-09-23 0intro .I length
340 6f4d00ee 2013-09-23 0intro .SH DESCRIPTION
341 6f4d00ee 2013-09-23 0intro These are configuration and maintenance commands
342 6f4d00ee 2013-09-23 0intro executed at the console of a
343 d32deab1 2020-08-16 rsc .MR fossil (4)
344 6f4d00ee 2013-09-23 0intro file server.
345 6f4d00ee 2013-09-23 0intro The commands are split into three groups above:
346 6f4d00ee 2013-09-23 0intro file server configuration,
347 6f4d00ee 2013-09-23 0intro file system configuration,
348 6f4d00ee 2013-09-23 0intro and file system maintenance.
349 6f4d00ee 2013-09-23 0intro This manual page is split in the same way.
350 6f4d00ee 2013-09-23 0intro .SS File server configuration
354 6f4d00ee 2013-09-23 0intro .RI ( . )
357 6f4d00ee 2013-09-23 0intro .IR file ,
358 6f4d00ee 2013-09-23 0intro treating each line as a command to be executed.
359 6f4d00ee 2013-09-23 0intro Blank lines and lines beginning with a
361 6f4d00ee 2013-09-23 0intro character are ignored.
362 6f4d00ee 2013-09-23 0intro Errors during execution are printed but do not stop the script.
363 6f4d00ee 2013-09-23 0intro Note that
365 6f4d00ee 2013-09-23 0intro is a file in the name space in which
366 6f4d00ee 2013-09-23 0intro .I fossil
367 6f4d00ee 2013-09-23 0intro was started,
369 6f4d00ee 2013-09-23 0intro a file in any file system served by
370 6f4d00ee 2013-09-23 0intro .IR fossil .
373 6f4d00ee 2013-09-23 0intro executes a 9P transaction; the arguments
374 6f4d00ee 2013-09-23 0intro are in the same format used by
375 d32deab1 2020-08-16 rsc .MR 9pcon (8) .
378 6f4d00ee 2013-09-23 0intro behaves similarly to
379 d32deab1 2020-08-16 rsc .MR bind (1) .
380 6f4d00ee 2013-09-23 0intro It is useful when fossil
381 6f4d00ee 2013-09-23 0intro is started without devices it needs configured
382 6f4d00ee 2013-09-23 0intro into its namespace.
385 6f4d00ee 2013-09-23 0intro toggles the debug flag and prints the new setting.
386 6f4d00ee 2013-09-23 0intro When the debug flag is set, all protocol messages
387 6f4d00ee 2013-09-23 0intro and information about authentication is printed to
388 6f4d00ee 2013-09-23 0intro standard error.
391 6f4d00ee 2013-09-23 0intro behaves identically to
392 d32deab1 2020-08-16 rsc .MR echo (1) ,
393 6f4d00ee 2013-09-23 0intro writing to the console.
395 6f4d00ee 2013-09-23 0intro .I Listen
396 6f4d00ee 2013-09-23 0intro manages the network addresses at which
397 6f4d00ee 2013-09-23 0intro fossil is listening.
398 6f4d00ee 2013-09-23 0intro With no arguments,
399 6f4d00ee 2013-09-23 0intro .I listen
400 6f4d00ee 2013-09-23 0intro prints the current list of addresses and their network directories.
401 6f4d00ee 2013-09-23 0intro With one argument, listen
402 6f4d00ee 2013-09-23 0intro .I address
403 6f4d00ee 2013-09-23 0intro starts a new listener at
404 6f4d00ee 2013-09-23 0intro .IR address ;
407 6f4d00ee 2013-09-23 0intro flag causes
408 6f4d00ee 2013-09-23 0intro .I listen
409 6f4d00ee 2013-09-23 0intro to remove the listener
410 6f4d00ee 2013-09-23 0intro at the given address.
411 6f4d00ee 2013-09-23 0intro By default, the user
413 6f4d00ee 2013-09-23 0intro is only allowed to attach on a connection after
414 6f4d00ee 2013-09-23 0intro at least one other user has successfully attached.
417 6f4d00ee 2013-09-23 0intro flag allows connections from
419 6f4d00ee 2013-09-23 0intro at any time.
422 6f4d00ee 2013-09-23 0intro flag causes
423 6f4d00ee 2013-09-23 0intro .I fossil
424 6f4d00ee 2013-09-23 0intro to check the IP address of incoming connections
426 6f4d00ee 2013-09-23 0intro .BR /mnt/ipok ,
427 6f4d00ee 2013-09-23 0intro rejecting attaches from disallowed addresses.
428 6f4d00ee 2013-09-23 0intro This mechanism is not intended for general use.
429 6f4d00ee 2013-09-23 0intro The server
430 6f4d00ee 2013-09-23 0intro .I sources.cs.bell-labs.com
431 6f4d00ee 2013-09-23 0intro uses it to comply with U.S. crytography
432 6f4d00ee 2013-09-23 0intro export regulations.
435 6f4d00ee 2013-09-23 0intro prints the maximum internal 9P message queue size
436 6f4d00ee 2013-09-23 0intro and the maximum number of 9P processes to
437 6f4d00ee 2013-09-23 0intro allocate for serving the queue.
442 6f4d00ee 2013-09-23 0intro options set the two variables.
444 6f4d00ee 2013-09-23 0intro .I Printconfig
445 6f4d00ee 2013-09-23 0intro prints the
446 6f4d00ee 2013-09-23 0intro .B config
447 6f4d00ee 2013-09-23 0intro line for each configured file system
448 6f4d00ee 2013-09-23 0intro and prints the
450 6f4d00ee 2013-09-23 0intro line, if any, used to configure this file server.
453 6f4d00ee 2013-09-23 0intro behaves like listen but uses
454 6f4d00ee 2013-09-23 0intro .BI /srv/ name
455 6f4d00ee 2013-09-23 0intro rather than a network address.
460 6f4d00ee 2013-09-23 0intro edits a list of console services rather than 9P services.
461 6f4d00ee 2013-09-23 0intro With no arguments,
463 6f4d00ee 2013-09-23 0intro prints the current list of services.
464 6f4d00ee 2013-09-23 0intro With one argument, srv
466 6f4d00ee 2013-09-23 0intro starts a new service at
467 6f4d00ee 2013-09-23 0intro .IR /srv/name ;
470 6f4d00ee 2013-09-23 0intro flag causes
472 6f4d00ee 2013-09-23 0intro to remove the named service.
474 6f4d00ee 2013-09-23 0intro .I [fsys] open
475 6f4d00ee 2013-09-23 0intro command below for a description of the
480 6f4d00ee 2013-09-23 0intro manipulates entries in the user table.
481 6f4d00ee 2013-09-23 0intro There is no distinction between users and groups:
482 6f4d00ee 2013-09-23 0intro a user is a group with one member.
483 6f4d00ee 2013-09-23 0intro For each user, the user table records:
484 6f4d00ee 2013-09-23 0intro .TF \fImembers
488 6f4d00ee 2013-09-23 0intro the string used to represent this user in the on-disk structures
491 6f4d00ee 2013-09-23 0intro the string used to represent this user in the 9P protocol
493 6f4d00ee 2013-09-23 0intro .I leader
494 b546bd6e 2017-07-16 rsc the group's leader (see Plan 9's
495 d32deab1 2020-08-16 rsc .MR stat (5)
496 6f4d00ee 2013-09-23 0intro for a description of the special privileges held by a group leader)
498 6f4d00ee 2013-09-23 0intro .I members
499 6f4d00ee 2013-09-23 0intro a comma-separated list of members in this group
505 6f4d00ee 2013-09-23 0intro are usually the same string, but need not be.
508 6f4d00ee 2013-09-23 0intro is used in file system structures archived to Venti,
509 6f4d00ee 2013-09-23 0intro it is impossible to change those disk structures,
510 6f4d00ee 2013-09-23 0intro and thus impossible to rename the
512 6f4d00ee 2013-09-23 0intro The translation from
516 6f4d00ee 2013-09-23 0intro allows the appearance of renaming the user even
517 6f4d00ee 2013-09-23 0intro though the on-disk structures still record the old name.
518 6f4d00ee 2013-09-23 0intro (In a conventional Unix file system, the
520 6f4d00ee 2013-09-23 0intro is stored as a small integer rather than a string.)
521 6f4d00ee 2013-09-23 0intro .I Leader
523 6f4d00ee 2013-09-23 0intro .I members
524 6f4d00ee 2013-09-23 0intro are names, not ids.
526 6f4d00ee 2013-09-23 0intro The first argument to
530 6f4d00ee 2013-09-23 0intro of a user.
531 6f4d00ee 2013-09-23 0intro The second argument is a verb, one of:
532 6f4d00ee 2013-09-23 0intro .TF \fI%newname
536 6f4d00ee 2013-09-23 0intro create a user with name
537 6f4d00ee 2013-09-23 0intro .RI ` name '
539 6f4d00ee 2013-09-23 0intro .RI ` id ;'
540 6f4d00ee 2013-09-23 0intro also create a home directory
541 6f4d00ee 2013-09-23 0intro .BI /active/usr/ uname \fR
544 6f4d00ee 2013-09-23 0intro create a user with name
545 6f4d00ee 2013-09-23 0intro .RI ` name '
547 6f4d00ee 2013-09-23 0intro .RI ` id ,'
548 6f4d00ee 2013-09-23 0intro but do not create a home directory
550 6f4d00ee 2013-09-23 0intro .BI % newname
551 6f4d00ee 2013-09-23 0intro rename user
552 6f4d00ee 2013-09-23 0intro .RI ` name '
554 6f4d00ee 2013-09-23 0intro .RI ` newname ,'
555 6f4d00ee 2013-09-23 0intro throughout the user table
557 6f4d00ee 2013-09-23 0intro .BI = leader
559 6f4d00ee 2013-09-23 0intro .IR name 's
560 6f4d00ee 2013-09-23 0intro group leader
562 6f4d00ee 2013-09-23 0intro .IR leader .
566 6f4d00ee 2013-09-23 0intro .IR name 's
567 6f4d00ee 2013-09-23 0intro group leader; then all members will be
568 6f4d00ee 2013-09-23 0intro considered leaders
570 6f4d00ee 2013-09-23 0intro .BI + member
572 6f4d00ee 2013-09-23 0intro .I member
574 6f4d00ee 2013-09-23 0intro .IR name 's
575 6f4d00ee 2013-09-23 0intro list of members
577 6f4d00ee 2013-09-23 0intro .BI - member
579 6f4d00ee 2013-09-23 0intro .I member
581 6f4d00ee 2013-09-23 0intro .IR name 's
582 6f4d00ee 2013-09-23 0intro list of members
584 6f4d00ee 2013-09-23 0intro If the verb is omitted, the entire entry for
586 6f4d00ee 2013-09-23 0intro is printed, in the form
587 6f4d00ee 2013-09-23 0intro `\fIid\fL:\fIname\fL:\fIleader\fL:\fImembers\fR.'
589 6f4d00ee 2013-09-23 0intro The end of this manual page gives examples.
592 6f4d00ee 2013-09-23 0intro manipulates the user table.
593 6f4d00ee 2013-09-23 0intro The user table is a list of lines in the form printed
599 6f4d00ee 2013-09-23 0intro flag resets the user table with the default:
602 6f4d00ee 2013-09-23 0intro adm:adm:adm:sys
603 6f4d00ee 2013-09-23 0intro none:none::
604 6f4d00ee 2013-09-23 0intro noworld:noworld::
605 6f4d00ee 2013-09-23 0intro sys:sys::
606 6f4d00ee 2013-09-23 0intro glenda:glenda:glenda:
610 6f4d00ee 2013-09-23 0intro .BR glenda ,
611 6f4d00ee 2013-09-23 0intro these users are mandatory: they must appear in all user
612 6f4d00ee 2013-09-23 0intro files and cannot be renamed.
616 6f4d00ee 2013-09-23 0intro flag reads a user table from the named
618 6f4d00ee 2013-09-23 0intro in file system
619 6f4d00ee 2013-09-23 0intro .BR main .
622 6f4d00ee 2013-09-23 0intro flag writes the table to
623 6f4d00ee 2013-09-23 0intro .B /active/adm/users
624 6f4d00ee 2013-09-23 0intro on the file system
625 6f4d00ee 2013-09-23 0intro .BR main .
626 6f4d00ee 2013-09-23 0intro .B /active/adm
628 6f4d00ee 2013-09-23 0intro .B /active/adm/users
629 6f4d00ee 2013-09-23 0intro will be created if they do not exist.
633 6f4d00ee 2013-09-23 0intro .B /active/adm/users
634 6f4d00ee 2013-09-23 0intro is automatically executed when the file system
636 6f4d00ee 2013-09-23 0intro is opened.
640 6f4d00ee 2013-09-23 0intro is automatically executed after each change to the user
641 6f4d00ee 2013-09-23 0intro table by the
646 6f4d00ee 2013-09-23 0intro prints a list of users attached to each active connection.
647 6f4d00ee 2013-09-23 0intro .SS File system configuration
649 6f4d00ee 2013-09-23 0intro sets the current file system to
650 6f4d00ee 2013-09-23 0intro .IR name ,
651 6f4d00ee 2013-09-23 0intro which must be configured and open (q.v.).
652 6f4d00ee 2013-09-23 0intro The current file system name is
653 6f4d00ee 2013-09-23 0intro displayed as the file server prompt.
654 6f4d00ee 2013-09-23 0intro The special name
656 6f4d00ee 2013-09-23 0intro stands for all file systems;
657 6f4d00ee 2013-09-23 0intro commands applied to
659 6f4d00ee 2013-09-23 0intro are applied to each file system in turn.
660 6f4d00ee 2013-09-23 0intro The commands
661 6f4d00ee 2013-09-23 0intro .BR config ,
662 6f4d00ee 2013-09-23 0intro .BR open ,
663 6f4d00ee 2013-09-23 0intro .BR venti ,
666 6f4d00ee 2013-09-23 0intro cannot be applied to
667 6f4d00ee 2013-09-23 0intro .BR all .
670 6f4d00ee 2013-09-23 0intro takes as an optional argument
672 6f4d00ee 2013-09-23 0intro .BR name )
673 6f4d00ee 2013-09-23 0intro a command to execute on the named file system.
674 6f4d00ee 2013-09-23 0intro Most commands require that the named file system
675 6f4d00ee 2013-09-23 0intro be configured and open; these commands can be invoked
676 6f4d00ee 2013-09-23 0intro without the
677 6f4d00ee 2013-09-23 0intro .BI fsys " name
678 6f4d00ee 2013-09-23 0intro prefix, in which case the current file system is used.
679 6f4d00ee 2013-09-23 0intro A few commands
680 6f4d00ee 2013-09-23 0intro .RB ( config ,
681 6f4d00ee 2013-09-23 0intro .BR open ,
683 6f4d00ee 2013-09-23 0intro .BR unconfig )
684 6f4d00ee 2013-09-23 0intro operate on unopened file systems; they require the prefix.
686 6f4d00ee 2013-09-23 0intro .I Config
687 6f4d00ee 2013-09-23 0intro creates a new file system named
689 6f4d00ee 2013-09-23 0intro using disk file
690 6f4d00ee 2013-09-23 0intro .IR device .
691 6f4d00ee 2013-09-23 0intro This just adds an entry to fossil's internal table.
693 6f4d00ee 2013-09-23 0intro .I device
694 6f4d00ee 2013-09-23 0intro is missing,
697 6f4d00ee 2013-09-23 0intro argument to
698 6f4d00ee 2013-09-23 0intro .IR fossil 's
700 6f4d00ee 2013-09-23 0intro option will be used instead;
701 6f4d00ee 2013-09-23 0intro this allows the
702 6f4d00ee 2013-09-23 0intro .I fossil
703 6f4d00ee 2013-09-23 0intro configuration file to avoid naming the partition that it is embedded in,
704 6f4d00ee 2013-09-23 0intro making it more portable.
707 6f4d00ee 2013-09-23 0intro establishes a connection to the Venti server
709 6f4d00ee 2013-09-23 0intro (by default, the environment variable
710 6f4d00ee 2013-09-23 0intro .B $venti
711 6f4d00ee 2013-09-23 0intro or the network variable
712 6f4d00ee 2013-09-23 0intro .BR $venti )
713 6f4d00ee 2013-09-23 0intro for use by the named file system.
716 6f4d00ee 2013-09-23 0intro command is issued before
717 6f4d00ee 2013-09-23 0intro .IR open ,
718 6f4d00ee 2013-09-23 0intro the default Venti server will be used.
719 6f4d00ee 2013-09-23 0intro If the file system is open,
720 6f4d00ee 2013-09-23 0intro and was not opened with the
723 6f4d00ee 2013-09-23 0intro the command redials the Venti server.
724 6f4d00ee 2013-09-23 0intro This can be used to reestablish broken connections.
725 6f4d00ee 2013-09-23 0intro It is not a good idea to use the command to switch
726 6f4d00ee 2013-09-23 0intro between Venti servers, since Fossil does not keep track
727 6f4d00ee 2013-09-23 0intro of which blocks are stored on which servers.
730 6f4d00ee 2013-09-23 0intro opens the file system, reading the
731 6f4d00ee 2013-09-23 0intro root and super blocks and allocating an in-memory
732 6f4d00ee 2013-09-23 0intro cache for disk and Venti blocks.
733 6f4d00ee 2013-09-23 0intro The options are:
734 6f4d00ee 2013-09-23 0intro .TF "-c\fI ncache
738 6f4d00ee 2013-09-23 0intro run with no authentication
741 6f4d00ee 2013-09-23 0intro run with no permission checking
744 6f4d00ee 2013-09-23 0intro do not attempt to connect to a Venti server
747 6f4d00ee 2013-09-23 0intro allow wstat to make arbitrary changes to the user and group fields
750 6f4d00ee 2013-09-23 0intro do not update file access times;
751 6f4d00ee 2013-09-23 0intro primarily to avoid wear on flash memories
754 6f4d00ee 2013-09-23 0intro open the file system read-only
756 6f4d00ee 2013-09-23 0intro .BI -c " ncache
757 6f4d00ee 2013-09-23 0intro allocate an in-memory cache of
758 6f4d00ee 2013-09-23 0intro .I ncache
759 6f4d00ee 2013-09-23 0intro (by default, 1000)
764 6f4d00ee 2013-09-23 0intro settings can be overridden on a per-connection basis
767 6f4d00ee 2013-09-23 0intro command above.
770 6f4d00ee 2013-09-23 0intro flushes all dirty file system blocks to disk
771 6f4d00ee 2013-09-23 0intro and then closes the device file.
773 6f4d00ee 2013-09-23 0intro .I Unconfig
774 6f4d00ee 2013-09-23 0intro removes the named file system (which must be closed)
775 6f4d00ee 2013-09-23 0intro from fossil's internal table.
778 6f4d00ee 2013-09-23 0intro .SS File system maintenance
780 6f4d00ee 2013-09-23 0intro marks the block at disk address
782 6f4d00ee 2013-09-23 0intro as available for allocation.
783 6f4d00ee 2013-09-23 0intro Before doing so, it prints a
785 6f4d00ee 2013-09-23 0intro command (q.v.)
786 6f4d00ee 2013-09-23 0intro that can be used to restore the block to its previous state.
789 6f4d00ee 2013-09-23 0intro displays (in hexadecimal)
790 6f4d00ee 2013-09-23 0intro the contents of the block at disk address
791 6f4d00ee 2013-09-23 0intro .IR addr ,
792 6f4d00ee 2013-09-23 0intro starting at
793 6f4d00ee 2013-09-23 0intro .I offset
794 6f4d00ee 2013-09-23 0intro and continuing for
796 6f4d00ee 2013-09-23 0intro bytes or until the end of the block.
799 6f4d00ee 2013-09-23 0intro (also hexadecimal)
800 6f4d00ee 2013-09-23 0intro is given, the contents in that range are
801 6f4d00ee 2013-09-23 0intro replaced with data.
802 6f4d00ee 2013-09-23 0intro When writing to a block,
804 6f4d00ee 2013-09-23 0intro prints the old and new contents,
805 6f4d00ee 2013-09-23 0intro so that the change is easily undone.
806 6f4d00ee 2013-09-23 0intro Editing blocks is discouraged.
809 6f4d00ee 2013-09-23 0intro zeros an entry from a disk block.
810 6f4d00ee 2013-09-23 0intro Before doing so, it prints a
812 6f4d00ee 2013-09-23 0intro command that can be used
813 6f4d00ee 2013-09-23 0intro to restore the entry.
816 6f4d00ee 2013-09-23 0intro removes the internal directory entry
817 6f4d00ee 2013-09-23 0intro and abandons storage associated with
818 6f4d00ee 2013-09-23 0intro .IR files .
819 6f4d00ee 2013-09-23 0intro It ignores the usual rules for sanity, such as checking against
820 6f4d00ee 2013-09-23 0intro removing a non-empty directory.
821 6f4d00ee 2013-09-23 0intro A subsequent
824 d32deab1 2020-08-16 rsc .MR fossil (4) )
825 6f4d00ee 2013-09-23 0intro will identify the abandoned storage so it can be reclaimed with
827 6f4d00ee 2013-09-23 0intro commands.
830 6f4d00ee 2013-09-23 0intro zeros a pointer in a disk block.
831 6f4d00ee 2013-09-23 0intro Before doing so, it prints a
833 6f4d00ee 2013-09-23 0intro command that can be used to restore the entry.
836 6f4d00ee 2013-09-23 0intro checks the file system for various inconsistencies.
837 6f4d00ee 2013-09-23 0intro If the file system is not already halted, it is halted for
838 6f4d00ee 2013-09-23 0intro the duration of the check.
839 6f4d00ee 2013-09-23 0intro If the archiver is currently sending a snapshot to Venti,
840 6f4d00ee 2013-09-23 0intro the check will refuse to run; the only recourse is to wait
841 6f4d00ee 2013-09-23 0intro for the archiver to finish.
843 6f4d00ee 2013-09-23 0intro A list of keyword options control the check.
845 6f4d00ee 2013-09-23 0intro .BR pblock ,
846 6f4d00ee 2013-09-23 0intro .BR pdir ,
849 6f4d00ee 2013-09-23 0intro options cause
851 6f4d00ee 2013-09-23 0intro to print the name of each block, directory, or file encountered.
853 6f4d00ee 2013-09-23 0intro By default,
855 6f4d00ee 2013-09-23 0intro reports errors but does not fix them.
857 6f4d00ee 2013-09-23 0intro .BR bclose ,
858 6f4d00ee 2013-09-23 0intro .BR clri ,
859 6f4d00ee 2013-09-23 0intro .BR clre ,
862 6f4d00ee 2013-09-23 0intro options specify correcting actions that may be taken:
863 6f4d00ee 2013-09-23 0intro closing leaked blocks, clearing bad file directory entries,
864 6f4d00ee 2013-09-23 0intro clearing bad pointers, and clearing bad entries.
867 6f4d00ee 2013-09-23 0intro option enables all of these; it is equivalent to
868 6f4d00ee 2013-09-23 0intro .B bclose
871 6f4d00ee 2013-09-23 0intro .BR clrp .
873 6f4d00ee 2013-09-23 0intro By default,
875 6f4d00ee 2013-09-23 0intro scans the portion of the active file system held in the write buffer,
876 6f4d00ee 2013-09-23 0intro avoiding blocks stored on Venti or used only in snapshots.
879 6f4d00ee 2013-09-23 0intro option causes
881 6f4d00ee 2013-09-23 0intro to scan the portion of the file system stored on Venti,
883 6f4d00ee 2013-09-23 0intro .B snapshot
884 6f4d00ee 2013-09-23 0intro option causes
886 6f4d00ee 2013-09-23 0intro to scan old snapshots.
887 6f4d00ee 2013-09-23 0intro Specifying
888 6f4d00ee 2013-09-23 0intro .B snapshot
891 6f4d00ee 2013-09-23 0intro to take a long time;
892 6f4d00ee 2013-09-23 0intro specifying
897 6f4d00ee 2013-09-23 0intro .B snapshot
900 6f4d00ee 2013-09-23 0intro to take a very long time.
902 6f4d00ee 2013-09-23 0intro .I Create
903 6f4d00ee 2013-09-23 0intro creates a file on the current file system.
908 6f4d00ee 2013-09-23 0intro .RI ( not
910 6f4d00ee 2013-09-23 0intro see the discussion above, in the description
913 6f4d00ee 2013-09-23 0intro command).
915 6f4d00ee 2013-09-23 0intro is the low 9 bits of the permission mode of the file,
916 6f4d00ee 2013-09-23 0intro in octal.
922 6f4d00ee 2013-09-23 0intro mode prefixes
923 6f4d00ee 2013-09-23 0intro set the append-only, directory, and lock bits.
926 6f4d00ee 2013-09-23 0intro is formatted as described in the
929 6f4d00ee 2013-09-23 0intro creating files or directories with the
930 6f4d00ee 2013-09-23 0intro .BR snapshot (s)
931 6f4d00ee 2013-09-23 0intro bit set is not allowed.
934 6f4d00ee 2013-09-23 0intro prints the amount of used disk space in the write buffer.
937 6f4d00ee 2013-09-23 0intro sets the low file system epoch.
938 6f4d00ee 2013-09-23 0intro Snapshots in the file system are given increasing epoch numbers.
939 6f4d00ee 2013-09-23 0intro The file system maintains a low and a high epoch number,
940 6f4d00ee 2013-09-23 0intro and only allows access to snapshots in that range.
941 6f4d00ee 2013-09-23 0intro The low epoch number can be moved forward to discard old snapshots
942 6f4d00ee 2013-09-23 0intro and reclaim the disk space they occupy.
943 6f4d00ee 2013-09-23 0intro (The high epoch number is always the epoch of the currently
944 6f4d00ee 2013-09-23 0intro active file system.)
946 6f4d00ee 2013-09-23 0intro With no argument
948 6f4d00ee 2013-09-23 0intro reports the current low and high epoch numbers.
949 6f4d00ee 2013-09-23 0intro The command
950 6f4d00ee 2013-09-23 0intro ``\fLepoch\fI n''\fR
951 6f4d00ee 2013-09-23 0intro is used to propose changing the low epoch to
953 6f4d00ee 2013-09-23 0intro In response,
954 6f4d00ee 2013-09-23 0intro .I fossil
956 6f4d00ee 2013-09-23 0intro .B /archive
958 6f4d00ee 2013-09-23 0intro .B /snapshot
959 6f4d00ee 2013-09-23 0intro for snapshots that would be discarded, printing their
960 6f4d00ee 2013-09-23 0intro epoch numbers and the
962 6f4d00ee 2013-09-23 0intro commands necessary to remove them.
963 6f4d00ee 2013-09-23 0intro The epoch is changed only if no such paths are found.
964 6f4d00ee 2013-09-23 0intro The usual sequence of commands is (1) run epoch to
965 6f4d00ee 2013-09-23 0intro print the snapshots and their epochs, (2) clri some snapshots,
966 6f4d00ee 2013-09-23 0intro (3) run epoch again.
967 6f4d00ee 2013-09-23 0intro If the file system is completely full (there are no free blocks),
969 6f4d00ee 2013-09-23 0intro may fail because it needs to allocate blocks.
970 6f4d00ee 2013-09-23 0intro For this situation,
973 6f4d00ee 2013-09-23 0intro flag to epoch forces the epoch change even when
974 6f4d00ee 2013-09-23 0intro it means discarding currently accessible snapshots.
975 6f4d00ee 2013-09-23 0intro Note that when there are still snapshots in
976 6f4d00ee 2013-09-23 0intro .BR /archive ,
977 6f4d00ee 2013-09-23 0intro the archiver should take care
978 6f4d00ee 2013-09-23 0intro of those snapshots (moving the blocks from disk to Venti)
979 6f4d00ee 2013-09-23 0intro if you give it more time.
983 6f4d00ee 2013-09-23 0intro flag to epoch causes it to remove any now-inaccessible
984 6f4d00ee 2013-09-23 0intro snapshot directories once it has changed the epoch.
985 6f4d00ee 2013-09-23 0intro This flag only makes sense in conjunction with the
990 6f4d00ee 2013-09-23 0intro is a very low-level way to retire snapshots.
991 6f4d00ee 2013-09-23 0intro The preferred way is by setting an automatic timer
993 6f4d00ee 2013-09-23 0intro .IR snaptime .
996 6f4d00ee 2013-09-23 0intro suspends all file system activity;
997 6f4d00ee 2013-09-23 0intro .I unhalt
998 6f4d00ee 2013-09-23 0intro resumes activity.
1000 6f4d00ee 2013-09-23 0intro .I Label
1001 6f4d00ee 2013-09-23 0intro displays and edits the label associated with a block.
1002 6f4d00ee 2013-09-23 0intro When editing, a parameter of
1004 6f4d00ee 2013-09-23 0intro means leave that field unchanged.
1005 6f4d00ee 2013-09-23 0intro Editing labels is discouraged.
1007 6f4d00ee 2013-09-23 0intro .I Remove
1009 6f4d00ee 2013-09-23 0intro .IR files .
1012 6f4d00ee 2013-09-23 0intro takes a temporary snapshot of the current file system,
1013 6f4d00ee 2013-09-23 0intro recording it in
1014 6f4d00ee 2013-09-23 0intro .BI /snapshot/ yyyy / mmdd / hhmm \fR,
1015 6f4d00ee 2013-09-23 0intro as described in
1016 d32deab1 2020-08-16 rsc .MR fossil (4) .
1019 6f4d00ee 2013-09-23 0intro flag causes
1021 6f4d00ee 2013-09-23 0intro to take an archival snapshot, recording it in
1022 6f4d00ee 2013-09-23 0intro .BI /archive/ yyyy / mmdd \fR,
1023 6f4d00ee 2013-09-23 0intro also described in
1024 d32deab1 2020-08-16 rsc .MR fossil (4) .
1025 6f4d00ee 2013-09-23 0intro By default the snapshot is taken of
1026 6f4d00ee 2013-09-23 0intro .BR /active ,
1027 6f4d00ee 2013-09-23 0intro the root of the active file system.
1030 6f4d00ee 2013-09-23 0intro flag specifies a different source path.
1033 6f4d00ee 2013-09-23 0intro flag specifies a different destination path.
1034 6f4d00ee 2013-09-23 0intro These two flags are useful together for moving snapshots into
1035 6f4d00ee 2013-09-23 0intro the archive tree.
1037 6f4d00ee 2013-09-23 0intro .I Snapclean
1038 6f4d00ee 2013-09-23 0intro immediately discards all snapshots that are more than
1039 6f4d00ee 2013-09-23 0intro .I timeout
1040 6f4d00ee 2013-09-23 0intro minutes old.
1041 6f4d00ee 2013-09-23 0intro The default timeout is the one set by the
1042 6f4d00ee 2013-09-23 0intro .I snaptime
1043 6f4d00ee 2013-09-23 0intro command.
1044 6f4d00ee 2013-09-23 0intro The discarding is a one-time event rather than
1045 6f4d00ee 2013-09-23 0intro a recurring event as in
1046 6f4d00ee 2013-09-23 0intro .IR snaptime .
1048 6f4d00ee 2013-09-23 0intro .I Snaptime
1049 6f4d00ee 2013-09-23 0intro displays and edits the times at which snapshots are automatically
1051 6f4d00ee 2013-09-23 0intro An archival snapshot is taken once a day, at
1052 6f4d00ee 2013-09-23 0intro .IR hhmm ,
1053 6f4d00ee 2013-09-23 0intro while temporary snapshots are taken at multiples of
1054 6f4d00ee 2013-09-23 0intro .I interval
1055 6f4d00ee 2013-09-23 0intro minutes.
1056 6f4d00ee 2013-09-23 0intro Temporary snapshots are discarded after they are
1057 6f4d00ee 2013-09-23 0intro .I timeout
1058 6f4d00ee 2013-09-23 0intro minutes old.
1059 6f4d00ee 2013-09-23 0intro The snapshot cleanup runs every
1060 6f4d00ee 2013-09-23 0intro .I timeout
1061 6f4d00ee 2013-09-23 0intro minutes or once a day, whichever is more frequent,
1062 6f4d00ee 2013-09-23 0intro so snapshots may grow to an age of almost twice the timeout
1063 6f4d00ee 2013-09-23 0intro before actually being discarded.
1064 6f4d00ee 2013-09-23 0intro With no arguments,
1065 6f4d00ee 2013-09-23 0intro .I snaptime
1066 6f4d00ee 2013-09-23 0intro prints the current snapshot times.
1071 6f4d00ee 2013-09-23 0intro options set the archive and snapshot times.
1075 6f4d00ee 2013-09-23 0intro .I interval
1078 6f4d00ee 2013-09-23 0intro can be used to disable that kind of automatic snapshot.
1081 6f4d00ee 2013-09-23 0intro option sets the snapshot timeout.
1083 6f4d00ee 2013-09-23 0intro .I timeout
1085 6f4d00ee 2013-09-23 0intro .LR none ,
1086 6f4d00ee 2013-09-23 0intro temporary snapshots are not automatically discarded.
1087 6f4d00ee 2013-09-23 0intro By default, all three times are set to
1088 6f4d00ee 2013-09-23 0intro .LR none .
1091 6f4d00ee 2013-09-23 0intro displays metadata for each of the named
1092 6f4d00ee 2013-09-23 0intro .IR files ,
1093 6f4d00ee 2013-09-23 0intro in the form:
1096 6f4d00ee 2013-09-23 0intro stat \fIfile elem uid gid perm length
1099 6f4d00ee 2013-09-23 0intro (Replacing
1102 6f4d00ee 2013-09-23 0intro .B wstat
1103 6f4d00ee 2013-09-23 0intro yields a valid command.)
1106 6f4d00ee 2013-09-23 0intro is an octal number less than or equal to 777,
1107 6f4d00ee 2013-09-23 0intro prefixed with any of the following letters
1108 6f4d00ee 2013-09-23 0intro to indicate additional bits.
1112 6f4d00ee 2013-09-23 0intro a \fRappend only
1113 6f4d00ee 2013-09-23 0intro d \fRdirectory
1114 6f4d00ee 2013-09-23 0intro l \fRexclusive use
1115 6f4d00ee 2013-09-23 0intro s \fRis the root of a snapshot
1116 6f4d00ee 2013-09-23 0intro t \fRtemporary bit
1117 6f4d00ee 2013-09-23 0intro A \fRMS-DOS archive bit
1118 6f4d00ee 2013-09-23 0intro G \fRsetgid
1119 6f4d00ee 2013-09-23 0intro H \fRMS-DOS hidden bit
1120 6f4d00ee 2013-09-23 0intro L \fRsymbolic link
1121 6f4d00ee 2013-09-23 0intro S \fRMS-DOS system bit
1122 6f4d00ee 2013-09-23 0intro U \fRsetuid
1123 6f4d00ee 2013-09-23 0intro Y \fRsticky
1126 6f4d00ee 2013-09-23 0intro The bits denoted by capital letters are included
1127 6f4d00ee 2013-09-23 0intro to support non-Plan 9 systems.
1128 6f4d00ee 2013-09-23 0intro They are not made visible by the 9P protocol.
1131 6f4d00ee 2013-09-23 0intro writes dirty blocks in memory to the disk.
1134 6f4d00ee 2013-09-23 0intro prints the Venti score for a
1135 d32deab1 2020-08-16 rsc .MR vac (1)
1136 6f4d00ee 2013-09-23 0intro archive containing the tree rooted
1138 6f4d00ee 2013-09-23 0intro .IR dir ,
1139 6f4d00ee 2013-09-23 0intro which must already be archived to Venti
1140 6f4d00ee 2013-09-23 0intro (typically
1142 6f4d00ee 2013-09-23 0intro is a directory in the
1143 6f4d00ee 2013-09-23 0intro .B /archive
1146 6f4d00ee 2013-09-23 0intro .I Wstat
1147 6f4d00ee 2013-09-23 0intro changes the metadata of the named
1148 6f4d00ee 2013-09-23 0intro .IR file .
1149 6f4d00ee 2013-09-23 0intro Specifying
1151 6f4d00ee 2013-09-23 0intro for any of the fields means ``don't change.''
1152 6f4d00ee 2013-09-23 0intro Attempts to change the
1156 6f4d00ee 2013-09-23 0intro bits in the
1158 6f4d00ee 2013-09-23 0intro are silently ignored.
1159 6f4d00ee 2013-09-23 0intro .SH EXAMPLES
1160 6f4d00ee 2013-09-23 0intro .IR Sources ,
1161 6f4d00ee 2013-09-23 0intro the Plan 9 distribution file server,
1162 6f4d00ee 2013-09-23 0intro uses the following configuration file:
1165 6f4d00ee 2013-09-23 0intro srv -p fscons.sources
1166 6f4d00ee 2013-09-23 0intro srv -p fscons.sources.adduserd
1167 6f4d00ee 2013-09-23 0intro srv sources
1168 6f4d00ee 2013-09-23 0intro fsys main config /dev/sdC0/fossil.outside
1169 6f4d00ee 2013-09-23 0intro fsys main open -c 25600
1170 6f4d00ee 2013-09-23 0intro fsys main
1171 6f4d00ee 2013-09-23 0intro users /active/adm/users
1172 6f4d00ee 2013-09-23 0intro listen tcp!*!564
1173 6f4d00ee 2013-09-23 0intro msg -m 40 -p 10
1174 6f4d00ee 2013-09-23 0intro snaptime -a 0000 -s 15
1177 6f4d00ee 2013-09-23 0intro The second console is used by the daemon
1178 6f4d00ee 2013-09-23 0intro that creates new accounts.
1180 6f4d00ee 2013-09-23 0intro To add a new user with
1185 6f4d00ee 2013-09-23 0intro and create his home directory:
1188 6f4d00ee 2013-09-23 0intro uname rob rob
1191 6f4d00ee 2013-09-23 0intro To create a new group
1193 6f4d00ee 2013-09-23 0intro (with no home directory)
1199 6f4d00ee 2013-09-23 0intro uname sys :sys
1200 6f4d00ee 2013-09-23 0intro uname sys +rob
1203 6f4d00ee 2013-09-23 0intro To save an old (but not yet discarded) snapshot into the archive tree:
1206 6f4d00ee 2013-09-23 0intro snap -a -s /snapshot/2003/1220/0700 -d /archive/2003/1220