Creating a Storage Gateway Cloud Sync Job
Describes how to create a job using Storage Gateway Cloud Sync.
Using the Management Console
- Log in to the management console.
-
Click Cloud Sync in the upper-right corner of the management console.
By default, a list of all the Cloud Sync jobs that have already been created is displayed.
- Click Create Cloud Sync Job.
-
In Create Cloud Sync Job page, specify the attributes of the job:
- Job Name: Required. A unique, user-friendly name for the job. Avoid entering confidential information.
-
Source Path: Path to the Cloud Sync source directory containing the files to sync.
-
If your are syncing a local file system to Oracle Cloud Infrastructure, specify the source path as:
/cloudsync/mounts/user_mount[/path_to_directory]
-
If your are syncing Oracle Cloud Infrastructure to a local file system, specify the source path as:
storage_gateway_file_system/path_to_directory]
-
-
Target Path: Path to the Cloud Sync target directory for the synced files.
-
If your are syncing a local file system to Oracle Cloud Infrastructure, specify the target path as:
storage_gateway_file_system/path_to_directory]
-
If your are syncing Oracle Cloud Infrastructure to a local file system, specify the target path as:
/cloudsync/mounts/user_mount[/path_to_directory]
-
-
Enable Auto-Deletion: Enable this option if you want Cloud Sync to automatically delete files from the target when:
- Files are deleted from the source.
- Source files have been renamed.
By default, when a file is deleted on the source, Cloud Sync does not automatically delete the file on the target unless you enable Enable Auto-Deletion. Also, when a source file is renamed, the file with the old name is deleted and a file with the new name is created. By default, Cloud Sync does not delete the file with the old name on the target (retaining both a file with the old name and a file with the new name) unless you choose Enable Auto-Deletion.
The names of all deleted files are stored in a job-specific log directory.
-
Click Create Cloud Sync Job.
Using the CLI
Open a command prompt and run ocisg cloudsync create
to create a
job:
sudo ocisg cloudsync create [--schedule=schedule] [--auto-delete] [--parallel=number] [--files-from=file] [--exclude-from=file] --verify-contents job_name source_path target_path
-
--schedule
is an option to automate the Cloud Sync job so it runs according to the specified schedule. Set the schedule value using the format used for cron jobs. For example,--schedule="*/5 * * * *"
runs the job every five minutes. -
--auto-delete
is an option to direct Cloud Sync to automatically delete files from the target when files are deleted from the source, and old names of files that have been renamed. By default, Cloud Sync does not automatically delete the files on the target unless you specify this option. The names of all deleted files are stored in a job-specific log directory. -
--parallel=number
is an option to specify the number of processes for data synchronization. By default, the number of processes is set to one. With a single process using a hard disk drive, you can expect a sync rate of 60-70 MB/s. If your system has higher disk throughput, you can use the number of processes that is proportional to the available bandwidth. Oracle recommends from two to five processes for optimal performance. The maximum number of processes allowed is 10. -
--files-from=file
is an option to specify a set of files that you want to sync to the target. If you do not set this option, the service syncs all files. The file should be a file under the/clousdync/
directory. For example,--files-from="/cloudsync/files.list"
. -
--exclude-from=file
is an option to specify a set of files that you want to exclude from the Cloud Sync job. The file should be a file under the/clousdync/
directory. For example,--exclude-from="/cloudsync/exclude.list"
. -
--verify-contents
is an option to enable verification of the destination contents against the source. If you do not explicitly enable verification, new files added to Cloud Sync sources after the job has started are not reported as errors when they do not appear in the destination. -
Avoid entering confidential information.
The Cloud Sync job is created and displayed in the list of jobs.