.\" Generated by scdoc 1.11.1 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "repopush" "1" "2021-04-04" .P .SH NAME .P repopush - safely rsync a package repository to another location .P .SH SYNOPSIS .P \fBrepopush\fR \fB[-Nv]\fR \fI/path/to/local/repo\fR \fIremote\fR .P \fBrepopush\fR \fB[-Nv]\fR \fB[-f configfile]\fR \fB-s\fR \fIsection\fR .P .SH DESCRIPTION .P The \fBrepopush\fR tool is yet another program that helps with copying the various package files and repository metadata from one OS package repository to another, taking care to copy and remove files in such a way as to never have the remote repository present an inconsistent view.\& This is done by first copying the new package files, then copying the new metadata files, then removing the outdated metadata files, and only then removing the outdated package files.\& .P The \fBrepopush\fR tool supports APT and YUM repositories and figures out which one to handle by analyzing the contents of the local repository.\& This is one of the reasons why the latter must indeed be a directory on a locally-mounted filesystem.\& .P The \fBrepopush\fR tool accepts the following command-line options: .P .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fB-f\fR \fIconfigfile\fR .br If the \fB-s\fR option is specified, the config file to read.\& The default is \fI$XDG_CONFIG_HOME\fR\fB/repopush.\&conf\fR (with a \fI$HOME\fR\fB/.\&config\fR default for \fI$XDG_CONFIG_HOME\fR).\& .RE .P .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fB-N\fR .br No-operation mode; display what would have been done.\& .RE .P .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fB-s\fR \fIsection\fR .br The config file section to read the \fBlocal\fR and \fBremote\fR variables from.\& .RE .P .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fB-v\fR .br Verbose mode; display diagnostic output.\& .RE .P There are two ways to specify the \fIlocal\fR and \fIremote\fR parameters: directly on the command line or in a INI-style configuration file.\& If the \fB-s\fR option is specified, \fBrepopush\fR will use the \fBconfget\fR tool to read the configuration file (either the one specified by the \fB-f\fR option or a default one in the user's home directory), look for the specified section, and use the "local" and "remote" values from that section.\& .P As noted above, the \fIlocal\fR parameter should be a path to a directory.\& The \fIremote\fR parameter can be in any format that the \fBrsync\fR tool accepts.\& .P .SH FILES .P If the \fIlocal\fR and \fIremote\fR parameters are specified on the command line, the operation of the \fBrepopush\fR tool is not affected by any files.\& .P If a configuration section is specified via the \fB-s\fR option, \fBrepopush\fR will look for a configuration file (either one specified via the \fB-f\fR option or a default one in the user's home directory) and treat it as an INI-style file containing one or more sections.\& See the documentation of the \fBconfget\fR tool for more information about the supported format of the INI-style files.\& .P .SH EXAMPLES .P Test-run a repository update: .P .RS 4 repopush -Nv /var/lib/repos/infra www:/var/www/repo/infra .P .RE Perform the actual update, a bit quieter: .P .RS 4 repopush /var/lib/repos/infra www:/var/www/repo/infra .P .RE The same, but with the "to-www-infra" section specified in the \fI$HOME\fR\fB/.\&config/repopush.\&conf\fR file: .P .RS 4 repopush -s to-www-infra .P .RE To achieve the above result, the \fBrepopush.\&conf\fR file should contain a section like this: .P .nf .RS 4 [to-www-infra] local=/var/lib/repos/infra remote=www:/var/www/repo/infra .fi .RE .P .SH HISTORY .P The \fBrepopush\fR tool was first written by Peter Pentchev in 2020.\& This manual page was created in 2021.\& .P .SH AUTHORS .P Peter Pentchev