Skip to main content

SyncConfig

Struct SyncConfig 

Source
pub struct SyncConfig {
Show 23 fields pub access_key: Option<String>, pub bucket: String, pub checkers: Option<i32>, pub checkpoint_push_interval: Option<String>, pub endpoint: Option<String>, pub fail_if_no_checkpoint: bool, pub flags: Option<Vec<String>>, pub ignore_checksum: Option<bool>, pub min_retention: Option<String>, pub multi_thread_cutoff: Option<String>, pub multi_thread_streams: Option<i32>, pub optimize_download_resources: bool, pub provider: Option<String>, pub read_bucket: Option<String>, pub region: Option<String>, pub retention_min_count: i32, pub secret_key: Option<String>, pub standby: bool, pub standby_pull_interval: Option<String>, pub start_from_checkpoint: Option<StartFromCheckpoint>, pub take_bucket_ownership: bool, pub transfers: Option<i32>, pub upload_concurrency: Option<i32>,
}
Expand description

SyncConfig

JSON schema
{
 "type": "object",
 "required": [
   "bucket"
 ],
 "properties": {
   "access_key": {
     "description": "The access key used to authenticate with the storage provider.\n\nIf not provided, rclone will fall back to environment-based credentials, such as\n`RCLONE_S3_ACCESS_KEY_ID`. In Kubernetes environments using IRSA (IAM Roles for Service Accounts),\nthis can be left empty to allow automatic authentication via the pod's service account.",
     "type": [
       "string",
       "null"
     ]
   },
   "bucket": {
     "description": "The name of the storage bucket.\n\nThis may include a path to a folder inside the bucket (e.g., `my-bucket/data`).\n\nPrefix it with `gs://` to sync to Google Cloud Storage through its native\nAPI instead of S3. `provider`, `access_key`, and `secret_key` are then\nignored; rclone authenticates with Application Default Credentials, for\nexample a GKE Workload Identity.",
     "type": "string"
   },
   "checkers": {
     "description": "The number of checkers to run in parallel.\nDefault: 20",
     "type": [
       "integer",
       "null"
     ],
     "format": "int32",
     "minimum": 0.0
   },
   "checkpoint_push_interval": {
     "description": "The interval between each push of checkpoints to object store, for\nexample `1h`.\n\nThe default is no periodic push; `null` disables periodic pushes\nexplicitly.",
     "type": [
       "string",
       "null"
     ]
   },
   "endpoint": {
     "description": "The endpoint URL for the storage service.\n\nThis is typically required for custom or local S3-compatible storage providers like MinIO.\nExample: `http://localhost:9000`\n\nFor a `gs://` bucket this is the Google Cloud Storage JSON API base URL;\na bare host gets `/storage/v1/` appended. Leave empty for the public service.\n\nRelevant rclone config key: [`endpoint`](https://rclone.org/s3/#s3-endpoint)",
     "type": [
       "string",
       "null"
     ]
   },
   "fail_if_no_checkpoint": {
     "description": "When true, the pipeline will fail to initialize if fetching the\nspecified checkpoint fails (missing, download error).\nWhen false, the pipeline will start from scratch instead.\n\nFalse by default.",
     "default": false,
     "type": "boolean"
   },
   "flags": {
     "description": "Extra flags to pass to `rclone`.\n\nWARNING: Supplying incorrect or conflicting flags can break `rclone`.\nUse with caution.\n\nRefer to the docs to see the supported flags:\n- [Global flags](https://rclone.org/flags/)\n- [S3 specific flags](https://rclone.org/s3/)",
     "type": [
       "array",
       "null"
     ],
     "items": {
       "type": "string"
     }
   },
   "ignore_checksum": {
     "description": "Set to skip post copy check of checksums, and only check the file sizes.\nThis can significantly improve the throughput.\nDefualt: false",
     "type": [
       "boolean",
       "null"
     ]
   },
   "min_retention": {
     "description": "The minimum age a checkpoint must reach before it becomes eligible for\ndeletion, for example `30d`. All younger checkpoints will be preserved.\nUnset selects the default, `DEFAULT_RETENTION_MIN_AGE`.",
     "default": "30d",
     "type": [
       "string",
       "null"
     ]
   },
   "multi_thread_cutoff": {
     "description": "Use multi-thread download for files above this size.\nFormat: `[size][Suffix]` (Example: 1G, 500M)\nSupported suffixes: k|M|G|T\nDefault: 100M",
     "type": [
       "string",
       "null"
     ]
   },
   "multi_thread_streams": {
     "description": "Number of streams to use for multi-thread downloads.\nDefault: 10",
     "type": [
       "integer",
       "null"
     ],
     "format": "int32",
     "minimum": 0.0
   },
   "optimize_download_resources": {
     "description": "When true, checkpoint downloads use the maximum resources available on\nthe host: `transfers` and `checkers` are scaled to the number of CPUs,\nand the download buffer is allowed to grow up to most of the available\nmemory. This maximizes download throughput at the cost of higher CPU and\nmemory usage during a pull.\n\nWhen false, downloads use the values configured via `transfers`,\n`checkers`, and the rclone defaults instead.\n\nDefault: true",
     "default": true,
     "type": "boolean"
   },
   "provider": {
     "description": "The name of the cloud storage provider (e.g., `\"AWS\"`, `\"Minio\"`).\n\nUsed for provider-specific behavior in rclone.\nIf omitted, defaults to `\"Other\"`.\n\nSee [rclone S3 provider documentation](https://rclone.org/s3/#s3-provider)",
     "type": [
       "string",
       "null"
     ]
   },
   "read_bucket": {
     "description": "A read-only bucket used as a fallback checkpoint source.\n\nWhen the pipeline has no local checkpoint and `bucket` contains no\ncheckpoint either, it will attempt to fetch the checkpoint from this\nlocation instead.  All connection settings (`endpoint`, `region`,\n`provider`, `access_key`, `secret_key`) are shared with `bucket`. The\nscheme is not: a `gs://` `bucket` needs a `gs://` `read_bucket` too,\nbecause the prefix alone selects the object store.\n\nThe pipeline **never writes** to `read_bucket`.\n\nMust point to a different location than `bucket`.",
     "type": [
       "string",
       "null"
     ]
   },
   "region": {
     "description": "The region that this bucket is in.\n\nLeave empty for Minio or the default region (`us-east-1` for AWS).",
     "type": [
       "string",
       "null"
     ]
   },
   "retention_min_count": {
     "description": "The minimum number of checkpoints to retain in object store.\nNo checkpoints will be deleted if the total count is below this threshold.\n\nDefault: 10",
     "default": 10,
     "type": "integer",
     "format": "int32",
     "minimum": 0.0
   },
   "secret_key": {
     "description": "The secret key used together with the access key for authentication.\n\nIf not provided, rclone will fall back to environment-based credentials, such as\n`RCLONE_S3_SECRET_ACCESS_KEY`. In Kubernetes environments using IRSA (IAM Roles for Service Accounts),\nthis can be left empty to allow automatic authentication via the pod's service account.",
     "type": [
       "string",
       "null"
     ]
   },
   "standby": {
     "description": "**Deprecated.** Use `initial=standby` when starting the pipeline instead.",
     "default": false,
     "deprecated": true,
     "type": "boolean"
   },
   "standby_pull_interval": {
     "description": "The interval between each attempt to fetch the latest checkpoint from\nobject store while in standby mode, for example `10s`.\n\nApplies only when `start_from_checkpoint` is set to `latest`. Unset\nselects the default, `DEFAULT_PULL_INTERVAL`.",
     "default": "10s",
     "type": [
       "string",
       "null"
     ]
   },
   "start_from_checkpoint": {
     "oneOf": [
       {
         "type": "null"
       },
       {
         "allOf": [
           {
             "$ref": "#/components/schemas/StartFromCheckpoint"
           }
         ]
       }
     ]
   },
   "take_bucket_ownership": {
     "description": "Take ownership of `bucket` when the pipeline starts, even if another\npipeline owns it.\n\nA pipeline records its ownership of `bucket` in an `owner.json` file\nat the root of `bucket`, and a push fails without writing anything if\nthat file names a different pipeline.  When this is `true`, the\npipeline takes ownership as it starts (a standby pipeline, when it is\nactivated): it logs a warning naming the previous and new owners and\noverwrites `owner.json`.  The previous owner's later pushes to\n`bucket` then fail.\n\nThis only applies at startup.  If another pipeline takes ownership of\n`bucket` while this pipeline is running, this pipeline's pushes fail.\n\nOwnership changes before the pipeline opens its checkpoint, so it\nsticks even if the pipeline then fails to start: the previous owner's\npushes keep failing.  To give `bucket` back, start the previous owner\nwith `take_bucket_ownership` set.\n\nUse this to hand a checkpoint location over to a pipeline that\nreplaces another one, e.g., after deleting and recreating a pipeline.\nStop the previous owner first, and set this on only one of the\npipelines that share a `bucket`.\n\nDefault: false",
     "default": false,
     "type": "boolean"
   },
   "transfers": {
     "description": "The number of file transfers to run in parallel.\nDefault: 20",
     "type": [
       "integer",
       "null"
     ],
     "format": "int32",
     "minimum": 0.0
   },
   "upload_concurrency": {
     "description": "The number of chunks of the same file that are uploaded for multipart uploads.\nDefault: 10",
     "type": [
       "integer",
       "null"
     ],
     "format": "int32",
     "minimum": 0.0
   }
 }
}

Fields§

§access_key: Option<String>

The access key used to authenticate with the storage provider.

If not provided, rclone will fall back to environment-based credentials, such as RCLONE_S3_ACCESS_KEY_ID. In Kubernetes environments using IRSA (IAM Roles for Service Accounts), this can be left empty to allow automatic authentication via the pod’s service account.

§bucket: String

The name of the storage bucket.

This may include a path to a folder inside the bucket (e.g., my-bucket/data).

Prefix it with gs:// to sync to Google Cloud Storage through its native API instead of S3. provider, access_key, and secret_key are then ignored; rclone authenticates with Application Default Credentials, for example a GKE Workload Identity.

§checkers: Option<i32>

The number of checkers to run in parallel. Default: 20

§checkpoint_push_interval: Option<String>

The interval between each push of checkpoints to object store, for example 1h.

The default is no periodic push; null disables periodic pushes explicitly.

§endpoint: Option<String>

The endpoint URL for the storage service.

This is typically required for custom or local S3-compatible storage providers like MinIO. Example: http://localhost:9000

For a gs:// bucket this is the Google Cloud Storage JSON API base URL; a bare host gets /storage/v1/ appended. Leave empty for the public service.

Relevant rclone config key: endpoint

§fail_if_no_checkpoint: bool

When true, the pipeline will fail to initialize if fetching the specified checkpoint fails (missing, download error). When false, the pipeline will start from scratch instead.

False by default.

§flags: Option<Vec<String>>

Extra flags to pass to rclone.

WARNING: Supplying incorrect or conflicting flags can break rclone. Use with caution.

Refer to the docs to see the supported flags:

§ignore_checksum: Option<bool>

Set to skip post copy check of checksums, and only check the file sizes. This can significantly improve the throughput. Defualt: false

§min_retention: Option<String>

The minimum age a checkpoint must reach before it becomes eligible for deletion, for example 30d. All younger checkpoints will be preserved. Unset selects the default, DEFAULT_RETENTION_MIN_AGE.

§multi_thread_cutoff: Option<String>

Use multi-thread download for files above this size. Format: [size][Suffix] (Example: 1G, 500M) Supported suffixes: k|M|G|T Default: 100M

§multi_thread_streams: Option<i32>

Number of streams to use for multi-thread downloads. Default: 10

§optimize_download_resources: bool

When true, checkpoint downloads use the maximum resources available on the host: transfers and checkers are scaled to the number of CPUs, and the download buffer is allowed to grow up to most of the available memory. This maximizes download throughput at the cost of higher CPU and memory usage during a pull.

When false, downloads use the values configured via transfers, checkers, and the rclone defaults instead.

Default: true

§provider: Option<String>

The name of the cloud storage provider (e.g., "AWS", "Minio").

Used for provider-specific behavior in rclone. If omitted, defaults to "Other".

See rclone S3 provider documentation

§read_bucket: Option<String>

A read-only bucket used as a fallback checkpoint source.

When the pipeline has no local checkpoint and bucket contains no checkpoint either, it will attempt to fetch the checkpoint from this location instead. All connection settings (endpoint, region, provider, access_key, secret_key) are shared with bucket. The scheme is not: a gs:// bucket needs a gs:// read_bucket too, because the prefix alone selects the object store.

The pipeline never writes to read_bucket.

Must point to a different location than bucket.

§region: Option<String>

The region that this bucket is in.

Leave empty for Minio or the default region (us-east-1 for AWS).

§retention_min_count: i32

The minimum number of checkpoints to retain in object store. No checkpoints will be deleted if the total count is below this threshold.

Default: 10

§secret_key: Option<String>

The secret key used together with the access key for authentication.

If not provided, rclone will fall back to environment-based credentials, such as RCLONE_S3_SECRET_ACCESS_KEY. In Kubernetes environments using IRSA (IAM Roles for Service Accounts), this can be left empty to allow automatic authentication via the pod’s service account.

§standby: bool

Deprecated. Use initial=standby when starting the pipeline instead.

§standby_pull_interval: Option<String>

The interval between each attempt to fetch the latest checkpoint from object store while in standby mode, for example 10s.

Applies only when start_from_checkpoint is set to latest. Unset selects the default, DEFAULT_PULL_INTERVAL.

§start_from_checkpoint: Option<StartFromCheckpoint>§take_bucket_ownership: bool

Take ownership of bucket when the pipeline starts, even if another pipeline owns it.

A pipeline records its ownership of bucket in an owner.json file at the root of bucket, and a push fails without writing anything if that file names a different pipeline. When this is true, the pipeline takes ownership as it starts (a standby pipeline, when it is activated): it logs a warning naming the previous and new owners and overwrites owner.json. The previous owner’s later pushes to bucket then fail.

This only applies at startup. If another pipeline takes ownership of bucket while this pipeline is running, this pipeline’s pushes fail.

Ownership changes before the pipeline opens its checkpoint, so it sticks even if the pipeline then fails to start: the previous owner’s pushes keep failing. To give bucket back, start the previous owner with take_bucket_ownership set.

Use this to hand a checkpoint location over to a pipeline that replaces another one, e.g., after deleting and recreating a pipeline. Stop the previous owner first, and set this on only one of the pipelines that share a bucket.

Default: false

§transfers: Option<i32>

The number of file transfers to run in parallel. Default: 20

§upload_concurrency: Option<i32>

The number of chunks of the same file that are uploaded for multipart uploads. Default: 10

Implementations§

Trait Implementations§

Source§

impl Clone for SyncConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SyncConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SyncConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&SyncConfig> for SyncConfig

Source§

fn from(value: &SyncConfig) -> Self

Converts to this type from the input type.
Source§

impl From<SyncConfig> for SyncConfig

Source§

fn from(value: SyncConfig) -> Self

Converts to this type from the input type.
Source§

impl Serialize for SyncConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<SyncConfig> for SyncConfig

Source§

type Error = ConversionError

The type returned in the event of a conversion error.
Source§

fn try_from(value: SyncConfig) -> Result<Self, ConversionError>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more