# cloudsync.sync_onetime

Run cloud sync task without creating it.

This method is a job.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: cloud_sync_sync_onetime

#### cloud_sync_sync_onetime

Type: object

Cloud sync task configuration for one-time execution.

No Additional Properties

##

#### Description

Type: string Default: ""

The name of the task to display in the UI.

##

#### Path

Type: string

The local path to back up beginning with `/mnt` or `/dev/zvol`.

##

#### Credentials

Type: integer

ID of the cloud credential.

##

#### CloudTaskAttributes

Type: object

Additional information for each backup, e.g. bucket name.

No Additional Properties

##

#### Bucket

Type: string

Name of the cloud storage bucket or container.

Must be at least `1` characters long

##

#### Folder

Type: string

Path within the cloud storage bucket to use as the root directory for operations.

##

#### Fast List

Type: boolean

Valid only for some providers. Use fewer transactions in exchange for more RAM. This may also speed up or slow down your transfer. See https://rclone.org/docs/#fast-list for more details.

##

#### Bucket Policy Only

Type: boolean

Valid only for GOOGLECLOUDSTORAGE provider. Access checks should use bucket-level IAM policies. If you want to upload objects to a bucket with Bucket Policy Only set then you will need to set this.

##

#### Chunk Size

Type: integer

Valid only for DROPBOX provider. Upload chunk size in MiB. Must fit in memory. Note that these chunks are buffered in memory and there might be a maximum of `--transfers` chunks in progress at once. Dropbox Business accounts can have monthly data transfer limits per team per month. By using larger chunk sizes you will decrease the number of data transfer calls used and you'll be able to transfer more data to your Dropbox Business account.

##

#### Acknowledge Abuse

Type: boolean

Valid only for GOOGLE_DRIVER provider. Allow files which return cannotDownloadAbusiveFile to be downloaded. If downloading a file returns the error "This file has been identified as malware or spam and cannot be downloaded" with the error code "cannotDownloadAbusiveFile" then enable this flag to indicate you acknowledge the risks of downloading the file and TrueNAS will download it anyway.

##

#### Region

Type: string

Valid only for S3 provider. S3 Region.

##

#### Encryption

Type: enum (of null or string)

Valid only for S3 provider. Server-Side Encryption.

##### Must be one of:

- null
- "AES256"

##

#### Storage Class

Type: enum (of string)

Valid only for S3 provider. The storage class to use.

##### Must be one of:

- ""
- "STANDARD"
- "REDUCED_REDUNDANCY"
- "STANDARD_IA"
- "ONEZONE_IA"
- "INTELLIGENT_TIERING"
- "GLACIER"
- "GLACIER_IR"
- "DEEP_ARCHIVE"

##

#### CloudCron

Type: object

Cron schedule dictating when the task should run.

No Additional Properties

##

#### Minute

Type: string Default: "00"

##

#### Hour

Type: string Default: "*"

"00" - "23"

##

#### Dom

Type: string Default: "*"

"1" - "31"

##

#### Month

Type: string Default: "*"

"1" (January) - "12" (December)

##

#### Dow

Type: string Default: "*"

"1" (Monday) - "7" (Sunday)

##

#### Pre Script

Type: string Default: ""

A Bash script to run immediately before every backup.

##

#### Post Script

Type: string Default: ""

A Bash script to run immediately after every backup if it succeeds.

##

#### Snapshot

Type: boolean Default: false

Whether to create a temporary snapshot of the dataset before every backup.

##

#### Include

Type: array of string

Paths to pass to `restic backup --include`.

No Additional Items

##### Each item of this array must be:

Type: string

Must be at least `1` characters long

##

#### Exclude

Type: array of string

Paths to pass to `restic backup --exclude`.

No Additional Items

##### Each item of this array must be:

Type: string

Must be at least `1` characters long

##

#### Args

Type: string Default: ""

(Slated for removal).

##

#### Enabled

Type: boolean Default: true

Can enable/disable the task.

##

#### Bwlimit

Type: array of object

Schedule of bandwidth limits.

No Additional Items

##### Each item of this array must be:

#### CloudSyncBwlimit

Type: object
No Additional Properties

##

#### Time

Type: string

Time at which the bandwidth limit takes effect in 24-hour format.

Examples:

    "00:00"

    "06:30"

    "18:00"

    "23:00"

##

#### Bandwidth

Bandwidth limit in bytes per second (upload and download).

## Any of

Type: integer

Value must be strictly greater than `0`

Type: null

##

#### Transfers

Default: null

Maximum number of parallel file transfers. `null` for default.

## Any of

Type: integer

Value must be strictly greater than `0`

Type: null

##

#### Direction

Type: enum (of string)

Direction of the cloud sync operation.

- `PUSH`: Upload local files to cloud storage
- `PULL`: Download files from cloud storage to local storage

##### Must be one of:

- "PUSH"
- "PULL"

##

#### Transfer Mode

Type: enum (of string)

How files are transferred between local and cloud storage.

- `SYNC`: Synchronize directories (add new, update changed, remove deleted)
- `COPY`: Copy files without removing any existing files
- `MOVE`: Move files (copy then delete from source)

##### Must be one of:

- "SYNC"
- "COPY"
- "MOVE"

##

#### Encryption

Type: boolean Default: false

Whether to encrypt files before uploading to cloud storage.

##

#### Filename Encryption

Type: boolean Default: false

Whether to encrypt filenames in addition to file contents.

##

#### Encryption Password

Type: string Default: ""

Password for client-side encryption. Empty string if encryption is disabled.

##

#### Encryption Salt

Type: string Default: ""

Salt value for encryption key derivation. Empty string if encryption is disabled.

##

#### Create Empty Src Dirs

Type: boolean Default: false

Whether to create empty directories in the destination that exist in the source.

##

#### Follow Symlinks

Type: boolean Default: false

Whether to follow symbolic links and sync the files they point to.

##### Parameter 2: cloud_sync_sync_onetime_options

#### cloud_sync_sync_onetime_options

Type: object

Options for the one-time sync operation.

No Additional Properties

##

#### Dry Run

Type: boolean Default: false

Whether to perform a dry run without making actual changes.

##

#### Result

Type: null

Returns `null` when the one-time sync operation is successfully started.

Required roles: CLOUD_SYNC_WRITE