diff --git a/b2/_internal/console_tool.py b/b2/_internal/console_tool.py index 07884790..8da6f82e 100644 --- a/b2/_internal/console_tool.py +++ b/b2/_internal/console_tool.py @@ -3007,6 +3007,8 @@ class Sync( Ignored files or file versions will not be taken for consideration during sync. The time should be given as a seconds timestamp (e.g. "1367900664") If you need milliseconds precision, put it after the comma (e.g. "1367900664.152") + Alternatively you can specify ``--exclude-if-uploaded-after`` to use the server-side + object creation timestamp rather than the modification time declared by the client. Files are considered to be the same if they have the same name and modification time. This behaviour can be changed using the @@ -3124,6 +3126,13 @@ def _setup_parser(cls, parser): default=None, metavar='TIMESTAMP' ) + add_normalized_argument( + parser, + '--exclude-if-uploaded-after', + type=parse_millis_from_float_timestamp, + default=None, + metavar='TIMESTAMP' + ) super()._setup_parser(parser) # add parameters from the mixins, and the parent class parser.add_argument('source') parser.add_argument('destination') @@ -3217,6 +3226,7 @@ def get_policies_manager_from_args(self, args): include_file_regexes=args.include_regex, exclude_all_symlinks=args.exclude_all_symlinks, exclude_modified_after=args.exclude_if_modified_after, + exclude_uploaded_after=args.exclude_if_uploaded_after, ) def get_synchronizer_from_args( @@ -3569,8 +3579,6 @@ class FileUploadBase(UploadFileMixin, UploadModeMixin, Command): The ``--custom-upload-timestamp``, in milliseconds-since-epoch, can be used to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. - The access to this feature is restricted - if you really need it, you'll - need to contact customer support to enable it temporarily for your account. Requires capability: @@ -3629,8 +3637,6 @@ class UploadUnboundStreamBase(UploadFileMixin, Command): The ``--custom-upload-timestamp``, in milliseconds-since-epoch, can be used to artificially change the upload timestamp of the file for the purpose of preserving retention policies after migration of data from other storage. - The access to this feature is restricted - if you really need it, you'll - need to contact customer support to enable it temporarily for your account. Requires capability: diff --git a/changelog.d/+48cc3755.removed.md b/changelog.d/+48cc3755.removed.md new file mode 100644 index 00000000..ded435ae --- /dev/null +++ b/changelog.d/+48cc3755.removed.md @@ -0,0 +1 @@ +Remove a note about --custom-upload-timestamp being restricted now that it's Generally Available. diff --git a/changelog.d/+9092be80.added.md b/changelog.d/+9092be80.added.md new file mode 100644 index 00000000..b8abdc7e --- /dev/null +++ b/changelog.d/+9092be80.added.md @@ -0,0 +1 @@ +Add `--exclude-if-uploaded-after` to `sync`.