*** Requires S3Express 1.5 or newer *** Release History
S3Express can be used to move files to Amazon S3. Moving files means that local files are deleted after/only if they are successfully uploaded to S3. To do that, use the option -move of the put command. The -move option instructs S3Express to immediately delete local files after/only if they are successfully uploaded.
A slightly different capability is given by the option -localdelete:COND. This option instructs S3Express to delete local files if they:
- Are not selected to be uploaded (e.g. due to the option -onlydiff or -onlynewer).
- Have a corresponding matching file already on S3 with same path and name.
- Satisfy the condition COND. COND is a condition that follows the general condition rules.
By using the option -localdelete:COND, a more sophisticated move operation can be setup, because differently from the basic -move option, -localdelete will:
- Delete local files after having verified they are already on S3, so local files are deleted in a successive run of S3Express, not immediately after they are uploaded like with the -move option.
- Delete local files according to a condition e.g. -localdelete:”age_days > 30” or -localdelete:”size_mb > 50” to delete local files selectively.
- Delete local files that are already on S3 even if these files were not uploaded by S3Express itself.
Note 1: uploading has priority over -localdelete. During the execution of the put command, firstly files are selected for uploading and after that the remaining files are selected for local deletion if the option -localdelete is specified.
Note 2: If the condition COND is not specified, that is, only -localdelete is used, then all local files that have a corresponding matching file on S3 will be deleted, regardless of age, size, time, etc.
|