Contained WithinFind More DocumentationFeatured Support Resources | Descargar este libro en PDF (6561 KB)
filesync(1)Name | Synopsis | Description | Options | Operands | Environment Variables | Exit Status | Files | Attributes | See Also Name
Synopsis
filesync [-aehmnqvy] [-o src | dst]
[-f src | dst | old | new] [-r directory]...
filesync [-aehmnqvy] -s source-dir -d dest-dir filename... Description
The filesync utility synchronizes files between multiple computer systems, typically a server and a portable computer. filesync synchronizes ordinary, directory or special files. Although intended for use on nomadic systems, filesync is useful for backup and file replication on more permanently connected systems. If files are synchronized between systems, the corresponding files on each of the systems are identical. Changing a file on one or both of the systems causes the files to become different (not synchronized). In order to make the files identical again, the differences between the files must be reconciled. See Reconciling and Synchronizing Files for specific details about how filesync reconciles and synchronizes files. There are two forms of the filesync command. The first form of filesync is invoked without file arguments. This form of filesync reconciles differences between the files and systems specified in the $HOME/.packingrules file. $HOME/.packingrules is a packing rules list for filesync and cachefspack, and contains a list of files to be kept synchronized. See packingrules(4) and cachefspack(1M). The second form of filesync copies specific files from a directory on the source system to a directory on the destination system. In addition, this form of filesync adds the file or files specified as arguments (filename) to $HOME/.packingrules. See -s and -d for information about specifying directories on source and destination systems. See OPERANDS for details about specifying file (filename) arguments. Multiple filesync commands are cumulative (that is, the specified files are added to the already existing packing rules file list). See Multiple filesync Commands. Reconciling and Synchronizing Filesfilesync synchronizes files between computer systems by performing the following two tasks: Resolving filesync ConflictsIn cases where files on both sides have changed, filesync attempts to determine which version should be chosen. If filesync cannot automatically determine which version should be selected, it prints out a warning message and leaves the two incompatible versions of the file unreconciled. In these cases, you must either resolve the differences manually, or tell filesync how to choose which file should win. Use the -o and -f options to tell filesync how to resolve conflicts (see OPTIONS). Alternatively, for each conflicting file, you can examine the two versions, determine which one should be kept, and manually bring the two versions into agreement (by copying, deleting, or changing the ownership or protection to be correct). You can then re-run filesync to see whether or not any other conflicts remain. Packing Rules FileThe packing rules file $HOME/.packingrules contains a list of files to be kept synchronized. The syntax of this file is described in packingrules(4). The $HOME/.packingrules file is automatically created if users invoke filesync with filename arguments. By using filesync options, users can augment the packing rules in $HOME/.packingrules. Many users choose to create the packing rules file manually and edit it by hand. Users can edit $HOME/.packingrules (using any editor) to permanently change the $HOME/.packingrules file, or to gain access to more powerful options that are not available from the command line (such as IGNORE commands). It is much easier to enter complex wildcard expressions by editing the $HOME/.packingrules file. Baseline File$HOME/.filesync-base is the filesync baseline summary file. filesync uses the information in $HOME/.filesync-base to identify the differences between files during the reconciliation and synchronization process. Users do not create or edit the baseline file. It is created automatically by filesync and records the last known state of agreement between all of the files being maintained. Multiple filesync CommandsOver a period of time, the set of files you want to keep synchronized can change. It is common, for instance, to want to keep files pertaining to only a few active projects on your notebook. If you continue to keep files associated with every project you have ever worked on synchronized, your notebook's disk will fill up with old files. Each filesync command will waste a lot of time updating files you no longer care about. If you delete the files from your notebook, filesync will want to perform the corresponding deletes on the server, which would not be what you wanted. Rather, you would like a way to tell filesync to stop synchronizing some of the files. There are two ways to do this: Either way works, and you can choose the one that seems easiest to you. For minor changes, it is probably easier to just edit $HOME/.packingrules. For major changes it is probably easier to start from scratch. Once filesync is no longer synchronizing a set of files, you can delete them from your notebook without having any effect on the server. Nomadic MachinesWhen using filesync to keep files synchronized between nomadic machines and a server, store the packing rules and baseline files on the nomadic machines, not the server. If, when logged into your notebook, the HOME environment variable does not normally point to a directory on your notebook, you can use the FILESYNC environment variable to specify an alternate location for the packing rules and baseline files. Each nomadic machine should carry its own packing rules and baseline file. Incorrect file synchronization can result if a server carries a baseline file and multiple nomadic machines attempt to reconcile against the server's baseline file. In this case, a nomadic machine could be using a baseline file that does not accurately describe the state of its files. This might result in incorrect reconciliations. To safeguard against the dangers associated with a single baseline file being shared by more than two machines, filesync adds a default rule to each new packing rules file. This default rule prevents the packing rules and baseline files from being copied. Options
The following options are supported: Operands
The following operands are supported: Environment Variables
Exit Status
Normally, if all files are already up-to-date, or if all files were successfully reconciled, filesync will exit with a status of 0. However, if either the -n option was specified or any errors occurred, the exit status will be the logical OR of the following: Files
AttributesSee attributes(5) for descriptions of the following attributes:
See AlsoSunOS 5.10 Last Revised 6 Nov 2000Name | Synopsis | Description | Options | Operands | Environment Variables | Exit Status | Files | Attributes | See Also |
||||||