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: StringThe 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: boolWhen 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: boolWhen 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".
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: i32The 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: boolDeprecated. 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: boolTake 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§
Source§impl SyncConfig
impl SyncConfig
pub fn builder() -> SyncConfig
Trait Implementations§
Source§impl Clone for SyncConfig
impl Clone for SyncConfig
Source§impl Debug for SyncConfig
impl Debug for SyncConfig
Source§impl<'de> Deserialize<'de> for SyncConfig
impl<'de> Deserialize<'de> for SyncConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&SyncConfig> for SyncConfig
impl From<&SyncConfig> for SyncConfig
Source§fn from(value: &SyncConfig) -> Self
fn from(value: &SyncConfig) -> Self
Source§impl From<SyncConfig> for SyncConfig
impl From<SyncConfig> for SyncConfig
Source§fn from(value: SyncConfig) -> Self
fn from(value: SyncConfig) -> Self
Source§impl Serialize for SyncConfig
impl Serialize for SyncConfig
Source§impl TryFrom<SyncConfig> for SyncConfig
impl TryFrom<SyncConfig> for SyncConfig
Source§type Error = ConversionError
type Error = ConversionError
Source§fn try_from(value: SyncConfig) -> Result<Self, ConversionError>
fn try_from(value: SyncConfig) -> Result<Self, ConversionError>
Auto Trait Implementations§
impl Forget for SyncConfig
impl Freeze for SyncConfig
impl Move for SyncConfig
impl RefUnwindSafe for SyncConfig
impl Send for SyncConfig
impl Sync for SyncConfig
impl Unpin for SyncConfig
impl UnsafeUnpin for SyncConfig
impl UnwindSafe for SyncConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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