Migrating backups from file systems to cloud storages and from cloud storages to file systems
Starting from version
11.0.4.1, you can use the nz_s3connector
utility to upload backups from the file
system to cloud storage. The utility also enables you to download backups from cloud storage to the
file system. nzrestore can restore these migrated backups from cloud by using a
cloud storage connector.
nz_s3connector
utility to upload and
download database backups between file system and cloud storage. The connector provides support for
the following cloud storages:- AWS S3 (Amazon Web Service - Simple Storage Service)
- IBM COS (IBM Cloud Object Store)
After you run the nzbackup command to back up a database to a file system, you can use this utility to upload database backup present on the file system to cloud storage and vice versa.
First use
nz_s3connector
is shipped as a part of the software support tools package. The
utility is dependent on AWS CLI. On the very first execution, the utility checks if AWS CLI is
present on the host. If AWS CLI is not present, AWS CLI version 1.16.144 is installed. The AWS
bundle is packaged with the utility, no external download is required. If AWS CLI is already
installed on the host, this step is skipped.
Arguments
- -db database
- Specifies the database name which backup is to be migrated.
- -dir dirname [...]
- Specifies the backup directory or directories. This is the same as the -dir parameter from the nzbackup command.
- -npshost name
- Specifies the host name.
- -backupset backupsetID
- Specifies the backupset ID as displayed in the backup history report. If omitted, all the backupsets for the database from the mentioned directory are uploaded/downloaded.
- {-upload | -download}
- Specifies whether the files need to be uploaded (host to cloud) or downloaded (cloud to host).
- -verbose
- Controls the flow of commentary. The default behavior is that the output is logged in a log file under the /tmp directory. If you specify -verbose, the relevant output is displayed on the terminal and nothing is logged in the file.
- -connectorArgs
- To connect to a cloud storage, you have to provide the following parameters:
Argument Required Description UNIQUE_ID mandatory This is a namespace used by customers to group data in the cloud bucket. ACCESS_KEY_ID mandatory Key generated on AWS/IBM COS. SECRET_ACCESS_KEY mandatory Secret access key generated on AWS/IBM COS. DEFAULT_REGION mandatory Region of the bucket. BUCKET_URL mandatory Name of the bucket. MULTIPART_SIZE_MB optional Default 105
. This value is in MB. It indicates the size of each part in a multipart upload. (Maximum 105 MB of buffer can be uploaded in one request.)ENDPOINT - optional for AWS
- mandatory for IBM COS
This is a well-known region URL to access your bucket. It is optional for AWS and mandatory for IBM COS.