mirror of
				https://github.com/minio/docs.git
				synced 2025-10-31 06:30:27 +03:00 
			
		
		
		
	MinIO uses RFC3339 data and time formatting and not ISO-8601. RFC3339 requires that there be a `T` as part of the data and time separation. ISO-8601 allows a space. The documentation also currently refers to using a date in the batch framework; this should be a RFC3339 date and time. e.g. ``` mc batch start play expire.yaml mc: <ERROR> Unable to start job. We encountered an internal error, please try again.: cause(parsing time "2006-01-02 15:04:05.00Z" as "2006-01-02T15:04:05Z07:00": cannot parse " 15:04:05.00Z" as "T"). ``` --------- Co-authored-by: Ravind Kumar <ravindk89@gmail.com>
		
			
				
	
	
		
			66 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			66 lines
		
	
	
		
			3.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| replicate:
 | |
|   apiVersion: v1
 | |
|   # source of the objects to be replicated
 | |
|   source:
 | |
|     type: TYPE # valid values are "s3" or "minio"
 | |
|     bucket: BUCKET
 | |
|     prefix: PREFIX # 'PREFIX' is optional
 | |
|     # If your source is the 'local' alias specified to 'mc batch start', then the 'endpoint' and 'credentials' fields are optional and can be omitted
 | |
|     # Either the 'source' or 'remote' *must* be the "local" deployment
 | |
|     endpoint: "http[s]://HOSTNAME:PORT" 
 | |
|     # path: "on|off|auto" # "on" enables path-style bucket lookup. "off" enables virtual host (DNS)-style bucket lookup. Defaults to "auto"
 | |
|     credentials:
 | |
|       accessKey: ACCESS-KEY # Required
 | |
|       secretKey: SECRET-KEY # Required
 | |
|     # sessionToken: SESSION-TOKEN # Optional only available when rotating credentials are used
 | |
|     snowball: # automatically activated if the source is local
 | |
|       disable: false # optionally turn-off snowball archive transfer
 | |
|       batch: 100 # upto this many objects per archive
 | |
|       inmemory: true # indicates if the archive must be staged locally or in-memory
 | |
|       compress: false # S2/Snappy compressed archive
 | |
|       smallerThan: 5MiB # create archive for all objects smaller than 5MiB
 | |
|       skipErrs: false # skips any source side read() errors
 | |
| 
 | |
|   # target where the objects must be replicated
 | |
|   target:
 | |
|     type: TYPE # valid values are "s3" or "minio"
 | |
|     bucket: BUCKET
 | |
|     prefix: PREFIX # 'PREFIX' is optional
 | |
|     # If your source is the 'local' alias specified to 'mc batch start', then the 'endpoint' and 'credentials' fields are optional and can be omitted
 | |
| 
 | |
|     # Either the 'source' or 'remote' *must* be the "local" deployment
 | |
|     endpoint: "http[s]://HOSTNAME:PORT"
 | |
|     # path: "on|off|auto" # "on" enables path-style bucket lookup. "off" enables virtual host (DNS)-style bucket lookup. Defaults to "auto"
 | |
|     credentials:
 | |
|       accessKey: ACCESS-KEY
 | |
|       secretKey: SECRET-KEY
 | |
|     # sessionToken: SESSION-TOKEN # Optional only available when rotating credentials are used
 | |
| 
 | |
|   # NOTE: All flags are optional
 | |
|   # - filtering criteria only applies for all source objects match the criteria
 | |
|   # - configurable notification endpoints
 | |
|   # - configurable retries for the job (each retry skips successfully previously replaced objects)
 | |
|   flags:
 | |
|     filter:
 | |
|       newerThan: "7d" # match objects newer than this value (e.g. 7d10h31s)
 | |
|       olderThan: "7d" # match objects older than this value (e.g. 7d10h31s)
 | |
|       createdAfter: "datetime" # match objects created after this date and time in RFC3339 format
 | |
|       createdBefore: "datetime" # match objects created before this date and time in RFC3339 format
 | |
| 
 | |
|       ## NOTE: tags are not supported when "source" is remote.
 | |
|       # tags:
 | |
|       #   - key: "name"
 | |
|       #     value: "pick*" # match objects with tag 'name', with all values starting with 'pick'
 | |
| 
 | |
|       # metadata:
 | |
|       #   - key: "content-type"
 | |
|       #     value: "image/*" # match objects with 'content-type', with all values starting with 'image/'
 | |
| 
 | |
|     notify:
 | |
|       endpoint: "https://notify.endpoint" # notification endpoint to receive job status events
 | |
|       token: "Bearer xxxxx" # optional authentication token for the notification endpoint
 | |
| 
 | |
|     retry:
 | |
|       attempts: 10 # number of retries for the job before giving up
 | |
|       delay: "500ms" # least amount of delay between each retry
 |