| 1 |
.\" vim: set ft=nroff .\" |
| 2 |
.\" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # |
| 3 |
.\" # |
| 4 |
.\" # C E D A R |
| 5 |
.\" # S O L U T I O N S "Software done right." |
| 6 |
.\" # S O F T W A R E |
| 7 |
.\" # |
| 8 |
.\" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # |
| 9 |
.\" # |
| 10 |
.\" # Author : Kenneth J. Pronovici <[email protected]> |
| 11 |
.\" # Language : nroff |
| 12 |
.\" # Project : Cedar Backup, release 3 |
| 13 |
.\" # Purpose : Manpage for cback3-amazons3-sync script |
| 14 |
.\" # |
| 15 |
.\" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # |
| 16 |
.\" |
| 17 |
.TH cback3\-amazons3-sync "1" "Nov 2020" "Cedar Backup 3" "Kenneth J. Pronovici" |
| 18 |
.SH NAME |
| 19 |
cback3\-amazons3-sync \- Synchronize a local directory with an Amazon S3 bucket |
| 20 |
.SH SYNOPSIS |
| 21 |
.B cback3\-amazons3\-sync |
| 22 |
[\fIswitches\fR] |
| 23 |
sourceDir s3BucketUrl |
| 24 |
.SH DESCRIPTION |
| 25 |
.PP |
| 26 |
This is the Cedar Backup 3 Amazon S3 sync tool. It synchronizes a local |
| 27 |
directory to an Amazon S3 cloud storage bucket. After the sync is complete, a |
| 28 |
validation step is taken. An error is reported if the contents of the bucket |
| 29 |
do not match the source directory, or if the indicated size for any file |
| 30 |
differs. |
| 31 |
.PP |
| 32 |
Generally, one can run the cback3\-amazons3\-sync command with no special |
| 33 |
switches. This will start it using the default Cedar Backup log file, etc. |
| 34 |
You only need to use the switches if you need to change the default behavior. |
| 35 |
.SH MIGRATING FROM VERSION 2 TO VERSION 3 |
| 36 |
.PP |
| 37 |
The main difference between Cedar Backup version 2 and Cedar Backup version 3 |
| 38 |
is the targeted Python interpreter. For most users, migration should be |
| 39 |
straightforward. See the discussion found at cback3(1) or reference the Cedar |
| 40 |
Backup user guide. |
| 41 |
.SH ARGUMENTS |
| 42 |
.TP |
| 43 |
\fBsourceDir\fR |
| 44 |
The source directory on a local disk. |
| 45 |
.TP |
| 46 |
\fBs3BucketUrl\fR |
| 47 |
The URL specifying the location of the Amazon S3 cloud storage bucket |
| 48 |
to synchronize with, like \fIs3://example.com\-backup/subdir\fR. |
| 49 |
.SH SWITCHES |
| 50 |
.TP |
| 51 |
\fB\-h\fR, \fB\-\-help\fR |
| 52 |
Display usage/help listing. |
| 53 |
.TP |
| 54 |
\fB\-V\fR, \fB\-\-version\fR |
| 55 |
Display version information. |
| 56 |
.TP |
| 57 |
\fB\-b\fR, \fB\-\-verbose\fR |
| 58 |
Print verbose output to the screen as well writing to the logfile. When this |
| 59 |
option is enabled, most information that would normally be written to the |
| 60 |
logfile will also be written to the screen. |
| 61 |
.TP |
| 62 |
\fB\-l\fR, \fB\-\-logfile\fR |
| 63 |
Specify the path to an alternate logfile. The default logfile file is |
| 64 |
\fI/var/log/cback3.log\fR. |
| 65 |
.TP |
| 66 |
\fB\-o\fR, \fB\-\-owner\fR |
| 67 |
Specify the ownership of the logfile, in the form user:group. The default |
| 68 |
ownership is \fIroot:adm\fR, to match the Debian standard for most logfiles. |
| 69 |
This value will only be used when creating a new logfile. If the logfile |
| 70 |
already exists when the cback3 script is executed, it will retain its existing |
| 71 |
ownership and mode. Only user and group names may be used, not numeric uid and |
| 72 |
gid values. |
| 73 |
.TP |
| 74 |
\fB\-m\fR, \fB\-\-mode\fR |
| 75 |
Specify the permissions for the logfile, using the numeric mode as in chmod(1). |
| 76 |
The default mode is \fI640\fR (\-rw\-r\-\-\-\-\-). This value will only be |
| 77 |
used when creating a new logfile. If the logfile already exists when the cback3 |
| 78 |
script is executed, it will retain its existing ownership and mode. |
| 79 |
.TP |
| 80 |
\fB\-O\fR, \fB\-\-output\fR |
| 81 |
Record some sub-command output to the logfile. When this option is enabled, all |
| 82 |
output from system commands will be logged. This might be useful for debugging |
| 83 |
or just for reference. |
| 84 |
.TP |
| 85 |
\fB\-d\fR, \fB\-\-debug\fR |
| 86 |
Write debugging information to the logfile. This option produces a high volume |
| 87 |
of output, and would generally only be needed when debugging a problem. This |
| 88 |
option implies the \-\-output option, as well. |
| 89 |
.TP |
| 90 |
\fB\-s\fR, \fB\-\-stack\fR |
| 91 |
Dump a Python stack trace instead of swallowing exceptions. This forces Cedar |
| 92 |
Backup to dump the entire Python stack trace associated with an error, rather |
| 93 |
than just propagating last message it received back up to the user interface. |
| 94 |
Under some circumstances, this is useful information to include along with a |
| 95 |
bug report. |
| 96 |
.TP |
| 97 |
\fB\-D\fR, \fB\-\-diagnostics\fR |
| 98 |
Display runtime diagnostic information and then exit. This diagnostic |
| 99 |
information is often useful when filing a bug report. |
| 100 |
.TP |
| 101 |
\fB\-v\fR, \fB\-\-verifyOnly\fR |
| 102 |
Only verify the S3 bucket contents against the directory on disk. Do not make |
| 103 |
any changes to the S3 bucket or transfer any files. This is intended as a quick |
| 104 |
check to see whether the sync is up-to-date. Although no files are |
| 105 |
transferred, the tool will still execute the source filename encoding check. |
| 106 |
.TP |
| 107 |
\fB\-u\fR, \fB\-\-uploadOnly\fR |
| 108 |
Implement a partial or "upload only" sync, instead of a full synchronization. |
| 109 |
Normally, synchronization would remove files that exist in S3 but do not exist |
| 110 |
in the directory on disk. With this flag, new files are uploaded, but no files |
| 111 |
are removed in S3. |
| 112 |
.TP |
| 113 |
\fB\-w\fR, \fB\-\-ignoreWarnings\fR |
| 114 |
The AWS CLI S3 sync process is very picky about filename encoding. Files that |
| 115 |
the Linux filesystem handles with no problems can cause problems in S3 if the |
| 116 |
filename cannot be encoded properly in your configured locale. As of this |
| 117 |
writing, filenames like this will cause the sync process to abort without |
| 118 |
transferring all files as expected. To avoid confusion, the tool tries to |
| 119 |
guess which files in the source directory will cause problems, and refuses to |
| 120 |
execute the AWS CLI S3 sync if any problematic files exist. If you'd rather |
| 121 |
proceed anyway, use this flag. |
| 122 |
.SH RETURN VALUES |
| 123 |
.PP |
| 124 |
This command returns 0 (zero) upon normal completion, and several other error |
| 125 |
codes related to particular errors. |
| 126 |
.TP |
| 127 |
\fB1\fR |
| 128 |
The Python interpreter version is not supported. |
| 129 |
.TP |
| 130 |
\fB2\fR |
| 131 |
Error processing command\-line arguments. |
| 132 |
.TP |
| 133 |
\fB3\fR |
| 134 |
Error configuring logging. |
| 135 |
.TP |
| 136 |
\fB5\fR |
| 137 |
Backup was interrupted with a CTRL\-C or similar. |
| 138 |
.TP |
| 139 |
\fB6\fR |
| 140 |
Other error during processing. |
| 141 |
.SH NOTES |
| 142 |
.PP |
| 143 |
This tool is a wrapper over the Amazon AWS CLI interface found in the aws(1) |
| 144 |
command. Specifically, cback3\-amazons3\-sync invokes "aws s3 sync" followed by |
| 145 |
"aws s3api list\-objects". |
| 146 |
.PP |
| 147 |
Cedar Backup itself is designed to run as root. However, cback3\-amazons3\-sync |
| 148 |
can be run safely as any user that is configured to use the Amazon AWS CLI |
| 149 |
interface. The aws(1) command will be executed by the same user which is |
| 150 |
executing cback3\-amazons3\-sync. |
| 151 |
.PP |
| 152 |
You must configure the AWS CLI interface to have a valid connection to Amazon |
| 153 |
S3 infrastructure before using cback3\-amazons3\-sync. For more information |
| 154 |
about how to accomplish this, see the Cedar Backup user guide. |
| 155 |
.SH SEE ALSO |
| 156 |
cback3(1) |
| 157 |
.SH FILES |
| 158 |
.TP |
| 159 |
\fI/var/log/cback3.log\fR - Default log file |
| 160 |
.SH URLS |
| 161 |
.TP |
| 162 |
The project homepage is: \fIhttps://github.com/pronovic/cedar\-backup3\fR |
| 163 |
.SH BUGS |
| 164 |
.PP |
| 165 |
If you find a bug, please report it. |
| 166 |
.PP |
| 167 |
If possible, give me the output from \-\-diagnostics, all of the error |
| 168 |
messages that the script printed into its log, and also any stack\-traces |
| 169 |
(exceptions) that Python printed. It would be even better if you could tell me |
| 170 |
how to reproduce the problem, for instance by sending me your configuration file. |
| 171 |
.PP |
| 172 |
Report bugs to <support@cedar\-solutions.com> or via GitHub issues |
| 173 |
tracker. |
| 174 |
.SH AUTHOR |
| 175 |
Written and maintained by Kenneth J. Pronovici <[email protected]> with contributions from others. |
| 176 |
.SH COPYRIGHT |
| 177 |
Copyright (c) 2004\-2020 Kenneth J. Pronovici. |
| 178 |
.PP |
| 179 |
This is free software; see the source for copying conditions. There is |
| 180 |
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 181 |
PURPOSE. |