CFCVSFTP(5)
2023-12-18
NAME ¶
cfcvsftp - configuration file format
DESCRIPTION ¶
The configuration file for cfcvsftp is written using scfg. Have a look at the example below to get an idea what this looks like. At the top level, there is a hosts directive and a keys directive.
The hosts directive contains children. Each child represents one target host. The name of the directive is the address of the target host (including the port number). This directive can be specified multiple times. The following directives need to be present as children:
user
The username to use for authentication at the target host. It is specified as the first parameter.
files
This is a list of files to be copied. Each file is represented as one child directive. Every child directive has a name representing the path of the source file. The following directives need to be present as children:
target_path
This is the path where the file(s) should be stored on the target host. A suffix will be appended to differentiate between the versions. The most recent file will have the suffix ".0". The path needs to be specified as the first parameter.
history_size
The number of versions to keep. The value needs to be specified as the first parameter.
The keys directive is currently only working on macOS. The name of every child directive will be interpreted as a path to an SSH private key and will be added to the ssh agent using ssh-add.
EXAMPLES ¶
The following example copies two files to the host 1.2.3.4:22. The username root will be used for authentication. The file /etc/apk/world will be copied to /root/world_backup. 10 versions will be kept. The path of the oldest file will be /root/world_backup.9. The path of the latest version of the file will be /root/world_backup.0. /etc/apk/repositories will be copied to the same host but to another directory. Only 4 versions will be kept. Before the copy operation, the private key found at /home/james/.ssh/id_rsa will be added to the SSH agent.
hosts {
1.2.3.4:22 {
user root
files {
/etc/apk/world {
target_path /root/world_backup
history_size 10
}
/etc/apk/repositories {
target_path /repositories_backup
history_size 4
}
}
}
}
keys {
/home/james/.ssh/id_rsa
}
SEE ALSO ¶
cfcvsftp(1)
AUTHORS ¶
Created and maintained by Hannes Braun <hannes@hannesbraun.net>. Up-to-date sources can be found at https://git.sr.ht/~hannes/cfcvsftp. Bugs and patches can be submitted by email to ~hannes/public-inbox@lists.sr.ht.