📄 nnfs.txt
字号:
nnfs2Name nnfs2 -- Synchronise filesystems between Non-Networked hostsSynopsis nnfs2 { --no-x11} [--add-first directory-name | --add directory-name | --add-nickname directory-name] nnfs2 [--help | --licence]INTRODUCTION The NNFS goal is to provide to ``one'' user a consistent file system over all the hosts used by the user. With hosts connected on a LAN you must use NFS instead of NNFS. In the case of hosts not connected by a network or connected by a slow network (modem) NFS is not the answer. With NNFS, the files are duplicated on all the computers. The up to date files are on the computer on which the user works. The NNFS filesystem is stored on the NNFS medium. Usually the NNFS medium is a floppy disk, it could be whatever you want (easily customisable), if there is much data, several floppies will be asked. When the user stops his work on a computer, he runs as last command: nnfs2. Then all his modifications (change, creation, deletion) are recorded on the NNFS medium. When the user starts to work on a computer, he runs as first command: nnfs2. Then all modifications (change, creation, deletion) stored on the NNFS medium are retrieved on current system. If the user forgot to run an update, nnfs2 will nevertheless optimally work. The only drawback is that some files will not be up to date on the host used by the user. It is also possible to have a numbered backup of modified/deleted files. So you cannot lose a file when you run nnfs2 (because the file is modified/deleted on another host)USAGE nnfs2 has a text and a graphical user interface. If you run the command for the first time or with a NNFS medium formatted or not, the command will provide contextual informations and help and will ask contextual questions. The graphical user interface allows you to edit the configuration. The interactive help is extensive and guide the user. This documentation is here to give general principles. By default the nnfs2 works with standards tools: floppy disk and gzip. The floppy disk access is done via system dependent commands (IRIX, AIX, HPUX and mcopy in the other cases). If you want to change these defaults, see the configuration section. As the default configurations use floppy disk, the nnfs2 default filter does not synchronise big files or ``garbage'' files. If you want to change these defaults, see the configuration section. It is not recommended to continue to modify files while nnfs2 is running. It is not dangerous but the result is unpredictable. Be carefull, some applications wrote their data on disk only when you stop them. So you must stop these applications before running nnfs2. For example netscape wrote some folder information only when you quit the program, so you must run nnfs2 only if netscape is not running.To do before using nnfs2 If the file hierarchy you want to synchronise is yet identical on all the hosts you can go to the next section. The root of the file hierarchy may have a different name on each host. To avoid problems you should use only relative internal symbolic links, so the links are correct on all the hosts. If the files hierarchy are not identical, you have two solutions: * You create yourself an identical hierarchy on all the hosts. The file modification date should be identical on all the hosts. * Or, you let nnfs2 create the identical hierarchy on all the hosts. In this case, a hierarchy made of the union of all the files is created, conflicts are solved using the modification date. It is the only case where the modification date is used to solve conflicts.Initialisations When you run the nnfs2 command on an host not known by the NNFS filesystem it will explain you how to add the host in the NNFS filesystem. If the NNFS filesystem does not fit in one medium, you will be asked to introduce medium. Now, the initialisation for 2 hosts named A and B will be detailed for the 2 user interfaces.Initialisations with X11 interface First run on host A. * You click on: Continue without reading the medium * you enter the local name of the hierarchy to synchronise, * you click on: Continue the update, * you click on: Medium AAA is ready for writing, * you click on: Quit Second run on host B, assuming medium is ready. * You click on: Continue the update * you enter the local name of the hierarchy to synchronise, * you click on: Continue the update, * you click on: Quit Normal run when initialisations are done, assuming medium is ready. * You click on: Continue the update * you click on: Continue the update, * you click on: QuitInitialisations with text interface First run on host A. * You type: nnfs2 --add-first dirname * You answer: c return to continue the update * You hit : return when medium is ready Second run on host B, assuming medium is ready. * You type: nnfs2 --add dirname * You answer: c return to continue the update Normal run when initialisations are done, assuming medium is ready. * You type: nnfs2 * You answer: c return to continue the updateHow to recover from NNFS medium read failure If there is a read error you can rerun nnfs2 a few times with the hope that the error will vanish. If it is not the case, put the bad medium in a trash, take a new one and create immediately a new NNFS filesystem with the current host. If the read error is before you start to work on an host. Try to not work on non-synchronized file in order to avoid future conflicts. Run nnfs2 as always before stopping to work on the host. If the read error is before you leave an host. You will want to copy the file modified by your session on the other host. To do so, modify all the file you want to synchronise and rerun nnfs2 on the host. For example by running find . -mtime -1 -print | xargs touch. If you do not do this, these files will be synchronised but only after adding the other host on NNFS filesystem, a run on local the host and a run on the other host. My experience about floppies is that there is floppies usable only 2 or 3 times and some usable hundreds of time. Even if they are from the same box.Historised backups Each time you run nnfs2 the files deleted or modified are moved in a directory. This directory is not mirrored! Example 1. Archiving modified files in default directory Current date: Sun Sep 16 14:57:47 CEST 2001 Modified file: foo/bar/Makefile Historised file: .nnfs/history/2001_09/16_14:57.47/foo/bar/Makefile So you can easily remove old historised files by date.Conflicts If you don't run nnfs2 before and after working, some update conflicts may be raised if you work on the same files. Example 2. A simple conflict * You run nnfs2 on host A * You modify foo on host A * You run nnfs2 on host A * You modify foo on host B * You run nnfs2 on host B (you should have done this before modifying the file) The conflict solving method is straightforward, the remote conflicting file is always copied on local host. If you don't agree, you can retrieve the local file content from the .nnfs/history directory. This method is not used to solve conflict when adding a new host. In this case, the most recent file is copied over the old ones
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -