Back up all the segments of a database cluster.

Synopsis

gpdr backup {-t | --type} [--buffer-size <string>] [--bundle]    
   [--bundle-limit <string>] [--bundle-size <string>] 
   [--compress-level <int>] [--compress-level-network <int>] [--compress-type <string>] [create-restore-point-timeout-duration <duration>]
   [--process-max <int>] [--storage-upload-chunk-size <string>]

gpdr backup { -h | --help }

Description

The gpdr backup command backs up all of the segments of the primary cluster. Backups can be incremental or full, as specified with the -t | --type option passed to the command.

Options

t | --type { full | incr }
Specifies the type of backup to perform: full for full or incr for incremental. The incremental backup will be based on the most recent full or incremental backup.
--buffer-size <string>
Optional. The buffer size for I/O operations. Greenplum Disaster Recovery uses buffer size for copy, compress, and other internal operations. Possible values include 16KiB, 32KiB, 64KiB, 128KiB, 256KiB, 512KiB, 1MiB, 2MiB, 4MiB, 8MiB or 16MiB. The default is 1 MiB.
--bundle
Optional. Passing in this option tells gpdr backup to combine smaller files to reduce the total number of files written to the repository. Writing fewer files is generally more efficient, especially on object stores such as S3.
--bundle-limit <string>
Optional. The size limit on files included in bundles. Files larger than this size will be stored separately. If you pass in --bundle-limit, you must also pass in the bundle option. The range is 8KiB-1PiB. The default is 2MiB.
--bundle-size <string>
Optional. The total size of files that will be added to a single bundle. Most bundles will be smaller than this size but it is possible that some will be slightly larger, so do not set this option to the maximum size that your file system allows. If you pass in --bundle-size, you must also pass in the bundle option. The range is 1MiB-1PiB. The default is 20MiB.
--compress-level <int>
Optional. The file compression level used when --compress-type is a value other than none. The range is 0-9. The default levels vary according to the --compress-type specified:

If compress-type is bz2, the default is 9.
If compress-type is gz, the default is 6.
If compress-type is lz4, the default is 1.
If compress-type is zst, the default is 3.

--compress-level-network <int>
Optional. The network compression level when compress-type is set to none. Compression is used to reduce network traffic but can be disabled by setting compress-level-network to 0. When compress-type is not set to none compress-level-network is ignored and compress-level is used instead, so that the file is only compressed once. The range is 0-9. The default is 3.
--compress-type <string>
Optional. The type of file compression to use. The choices are none, bz2, gz, lz4 or zst. The default is gz.
create-restore-point-timeout <duration>
Optional. Specifies how long GPDR should wait for all WAL files to get archived when creating the restore point at the end of backup. Valid units are s, m, and h. The minimum permitted value is 30m0s. The default is 596523h14m7s.
--process-max <int>
Optional. The maximum number of processes to use for data compression and transfer. Each process will perform compression and transfer to make the command run faster, but do not set --process-max so high that it negatively affects database performance. The range of accepted values is 1-999. The default is 1.
--storage-upload-chunk-size <string>
Optional. The storage upload chunk size. Object stores -- such as S3, and GCS -- allow files to be uploaded to the repository in chunks when the file is too large to be stored in memory. A larger chunk size generally results in better performance because it minimizes upload requests and allow more files to be uploaded in a single request rather than in chunks. The disadvantages are twofold: memory usage is higher and because the chunk buffer must be allocated per process, larger process-max values will lead to more memory being consumed overall. The range is 64KiB-1TiB. The default chunk size value varies by storage type:

If the storage type is S3, the default value is 5MiB.
If the storage type is GCS, the default value is 4MiB.

-h | --help
Displays a help message for the gpdr backup command.

Examples

Execute a full backup:

$ gpdr backup --type full

Execute an incremental backup:

$ gpdr backup --type incr

See Also

gpdr

check-circle-line exclamation-circle-line close-line
Scroll to top icon