mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-04-18 21:44:02 +03:00
fix(mcs): MCOL-5618: change list option to --list and refactor.
fix(mcs): list option to -li/--list for mcs backup, restore and dbrm_restore commands fix(mcs): add missed option "aro" fix(mcs): resort options for backup and dbrm_backup to keep same ordering as in original scrypt fix(mcs docs): updated README.md + mcs.1
This commit is contained in:
parent
6a57537cb1
commit
6e64d3a38d
@ -53,26 +53,28 @@ Name of the bucket to store the columnstore backups.
|
|||||||
Example: "s3://my-cs-backups"
|
Example: "s3://my-cs-backups"
|
||||||
* `-url, --endpoint-url TEXT`: Used by on premise S3 vendors.
|
* `-url, --endpoint-url TEXT`: Used by on premise S3 vendors.
|
||||||
Example: "http://127.0.0.1:8000"
|
Example: "http://127.0.0.1:8000"
|
||||||
* `-nv-ssl, --no-verify-ssl / -v-ssl, --verify-ssl`: Skips verifying ssl certs, useful for onpremise s3 storage. [default: v-ssl]
|
|
||||||
* `-s, --storage TEXT`: What storage topogoly is being used by Columnstore - found in /etc/columnstore/storagemanager.cnf.
|
* `-s, --storage TEXT`: What storage topogoly is being used by Columnstore - found in /etc/columnstore/storagemanager.cnf.
|
||||||
Options: "LocalStorage" or "S3" [default: LocalStorage]
|
Options: "LocalStorage" or "S3" [default: LocalStorage]
|
||||||
* `-i, --incremental TEXT`: Adds columnstore deltas to an existing full backup. Backup folder to apply increment could be a value or "auto_most_recent" - the incremental backup applies to last full backup.
|
* `-i, --incremental TEXT`: Adds columnstore deltas to an existing full backup. Backup folder to apply increment could be a value or "auto_most_recent" - the incremental backup applies to last full backup.
|
||||||
|
* `-P, --parallel INTEGER`: Determines if columnstore data directories will have multiple rsync running at the same time for different subfolders to parallelize writes. Ignored if "-c/--compress" argument not set. [default: 4]
|
||||||
* `-ha, --highavilability / -no-ha, --no-highavilability`: Hint wether shared storage is attached @ below on all nodes to see all data
|
* `-ha, --highavilability / -no-ha, --no-highavilability`: Hint wether shared storage is attached @ below on all nodes to see all data
|
||||||
HA LocalStorage ( /var/lib/columnstore/dataX/ )
|
HA LocalStorage ( /var/lib/columnstore/dataX/ )
|
||||||
HA S3 ( /var/lib/columnstore/storagemanager/ ) [default: no-ha]
|
HA S3 ( /var/lib/columnstore/storagemanager/ ) [default: no-ha]
|
||||||
* `-f, --config-file TEXT`: Path to backup configuration file to load variables from.
|
* `-f, --config-file TEXT`: Path to backup configuration file to load variables from - relative or full path accepted.
|
||||||
* `-sbrm, --skip-save-brm / -no-sbrm, --no-skip-save-brm`: Skip saving brm prior to running a backup - ideal for dirty backups. [default: no-sbrm]
|
* `-sbrm, --skip-save-brm / -no-sbrm, --no-skip-save-brm`: Skip saving brm prior to running a backup - ideal for dirty backups. [default: no-sbrm]
|
||||||
* `-spoll, --skip-polls / -no-spoll, --no-skip-polls`: Skip sql checks confirming no write/cpimports running. [default: no-spoll]
|
* `-spoll, --skip-polls / -no-spoll, --no-skip-polls`: Skip sql checks confirming no write/cpimports running. [default: no-spoll]
|
||||||
* `-slock, --skip-locks / -no-slock, --no-skip-locks`: Skip issuing write locks - ideal for dirty backups. [default: no-slock]
|
* `-slock, --skip-locks / -no-slock, --no-skip-locks`: Skip issuing write locks - ideal for dirty backups. [default: no-slock]
|
||||||
* `-smdb, --skip-mariadb-backup / -no-smdb, --no-skip-mariadb-backup`: Skip running a mariadb-backup for innodb data - ideal for incremental dirty backups. [default: no-smdb]
|
* `-smdb, --skip-mariadb-backup / -no-smdb, --no-skip-mariadb-backup`: Skip running a mariadb-backup for innodb data - ideal for incremental dirty backups. [default: no-smdb]
|
||||||
* `-sb, --skip-bucket-data / -no-sb, --no-skip-bucket-data`: Skip taking a copy of the columnstore data in the bucket. [default: no-sb]
|
* `-sb, --skip-bucket-data / -no-sb, --no-skip-bucket-data`: Skip taking a copy of the columnstore data in the bucket. [default: no-sb]
|
||||||
|
* `-nb, --name-backup TEXT`: Define the name of the backup - default: $(date +%m-%d-%Y) [default: 03-20-2025]
|
||||||
|
* `-c, --compress TEXT`: Compress backup in X format - Options: [ pigz ].
|
||||||
|
* `-q, --quiet / -no-q, --no-quiet`: Silence verbose copy command outputs. [default: no-q]
|
||||||
|
* `-nv-ssl, --no-verify-ssl / -v-ssl, --verify-ssl`: Skips verifying ssl certs, useful for onpremise s3 storage. [default: v-ssl]
|
||||||
* `-pi, --poll-interval INTEGER`: Number of seconds between poll checks for active writes & cpimports. [default: 5]
|
* `-pi, --poll-interval INTEGER`: Number of seconds between poll checks for active writes & cpimports. [default: 5]
|
||||||
* `-pmw, --poll-max-wait INTEGER`: Max number of minutes for polling checks for writes to wait before exiting as a failed backup attempt. [default: 60]
|
* `-pmw, --poll-max-wait INTEGER`: Max number of minutes for polling checks for writes to wait before exiting as a failed backup attempt. [default: 60]
|
||||||
* `-q, --quiet / -no-q, --no-quiet`: Silence verbose copy command outputs. [default: no-q]
|
|
||||||
* `-c, --compress TEXT`: Compress backup in X format - Options: [ pigz ].
|
|
||||||
* `-P, --parallel INTEGER`: Determines if columnstore data directories will have multiple rsync running at the same time for different subfolders to parallelize writes. Ignored if "-c/--compress" argument not set. [default: 4]
|
|
||||||
* `-nb, --name-backup TEXT`: Define the name of the backup - default: $(date +%m-%d-%Y) [default: 03-06-2025]
|
|
||||||
* `-r, --retention-days INTEGER`: Retain backups created within the last X days, default 0 == keep all backups. [default: 0]
|
* `-r, --retention-days INTEGER`: Retain backups created within the last X days, default 0 == keep all backups. [default: 0]
|
||||||
|
* `-aro, --apply-retention-only`: Only apply retention policy to existing backups, does not run a backup.
|
||||||
|
* `-li, --list`: List backups.
|
||||||
* `--help`: Show this message and exit.
|
* `--help`: Show this message and exit.
|
||||||
|
|
||||||
## `mcs dbrm_backup`
|
## `mcs dbrm_backup`
|
||||||
@ -87,13 +89,14 @@ $ mcs dbrm_backup [OPTIONS]
|
|||||||
|
|
||||||
**Options**:
|
**Options**:
|
||||||
|
|
||||||
* `-m, --mode TEXT`: "loop" or "once" ; Determines if this script runs in a forever loop sleeping -i minutes or just once. [default: once]
|
|
||||||
* `-i, --interval INTEGER`: Number of minutes to sleep when --mode=loop. [default: 90]
|
* `-i, --interval INTEGER`: Number of minutes to sleep when --mode=loop. [default: 90]
|
||||||
* `-r, --retention-days INTEGER`: Retain dbrm backups created within the last X days, the rest are deleted [default: 7]
|
* `-r, --retention-days INTEGER`: Retain dbrm backups created within the last X days, the rest are deleted [default: 7]
|
||||||
* `-p, --path TEXT`: Path of where to save the dbrm backups on disk. [default: /tmp/dbrm_backups]
|
* `-bl, --backup-location TEXT`: Path of where to save the dbrm backups on disk. [default: /tmp/dbrm_backups]
|
||||||
* `-nb, --name-backup TEXT`: Custom name to prefex dbrm backups with. [default: dbrm_backup]
|
* `-m, --mode TEXT`: "loop" or "once" ; Determines if this script runs in a forever loop sleeping -i minutes or just once. [default: once]
|
||||||
* `-q, --quiet / -no-q, --no-quiet`: Silence verbose copy command outputs. [default: no-q]
|
* `-nb, --name-backup TEXT`: Define the prefix of the backup - default: dbrm_backup+date +%Y%m%d_%H%M%S [default: dbrm_backup]
|
||||||
* `-ssm, --skip-storage-manager / -no-ssm, --no-skip-storage-manager`: Skip backing up storagemanager directory. [default: no-ssm]
|
* `-ssm, --skip-storage-manager / -no-ssm, --no-skip-storage-manager`: Skip backing up storagemanager directory. [default: no-ssm]
|
||||||
|
* `-q, --quiet / -no-q, --no-quiet`: Silence verbose copy command outputs. [default: no-q]
|
||||||
|
* `-li, --list`: List backups.
|
||||||
* `--help`: Show this message and exit.
|
* `--help`: Show this message and exit.
|
||||||
|
|
||||||
## `mcs restore`
|
## `mcs restore`
|
||||||
@ -127,15 +130,16 @@ Options: "LocalStorage" or "S3" [default: LocalStorage]
|
|||||||
* `-nr, --new-region TEXT`: Defines the region of the new bucket to copy the s3 data to from the backup bucket.
|
* `-nr, --new-region TEXT`: Defines the region of the new bucket to copy the s3 data to from the backup bucket.
|
||||||
* `-nk, --new-key TEXT`: Defines the aws key to connect to the new_bucket.
|
* `-nk, --new-key TEXT`: Defines the aws key to connect to the new_bucket.
|
||||||
* `-ns, --new-secret TEXT`: Defines the aws secret of the aws key to connect to the new_bucket.
|
* `-ns, --new-secret TEXT`: Defines the aws secret of the aws key to connect to the new_bucket.
|
||||||
|
* `-P, --parallel INTEGER`: Determines number of decompression and mdbstream threads. Ignored if "-c/--compress" argument not set. [default: 4]
|
||||||
* `-ha, --highavilability / -no-ha, --no-highavilability`: Flag for high available systems (meaning shared storage exists supporting the topology so that each node sees all data) [default: no-ha]
|
* `-ha, --highavilability / -no-ha, --no-highavilability`: Flag for high available systems (meaning shared storage exists supporting the topology so that each node sees all data) [default: no-ha]
|
||||||
* `-cont, --continue / -no-cont, --no-continue`: This acknowledges data in your --new_bucket is ok to delete when restoring S3. When set to true skips the enforcement that new_bucket should be empty prior to starting a restore. [default: no-cont]
|
* `-cont, --continue / -no-cont, --no-continue`: This acknowledges data in your --new_bucket is ok to delete when restoring S3. When set to true skips the enforcement that new_bucket should be empty prior to starting a restore. [default: no-cont]
|
||||||
* `-f, --config-file TEXT`: Path to backup configuration file to load variables from.
|
* `-f, --config-file TEXT`: Path to backup configuration file to load variables from - relative or full path accepted.
|
||||||
* `-smdb, --skip-mariadb-backup / -no-smdb, --no-skip-mariadb-backup`: Skip restoring mariadb server via mariadb-backup - ideal for only restoring columnstore. [default: no-smdb]
|
* `-smdb, --skip-mariadb-backup / -no-smdb, --no-skip-mariadb-backup`: Skip restoring mariadb server via mariadb-backup - ideal for only restoring columnstore. [default: no-smdb]
|
||||||
* `-sb, --skip-bucket-data / -no-sb, --no-skip-bucket-data`: Skip restoring columnstore data in the bucket - ideal if looking to only restore mariadb server. [default: no-sb]
|
* `-sb, --skip-bucket-data / -no-sb, --no-skip-bucket-data`: Skip restoring columnstore data in the bucket - ideal if looking to only restore mariadb server. [default: no-sb]
|
||||||
* `-c, --compress TEXT`: Hint that the backup is compressed in X format. Options: [ pigz ].
|
* `-c, --compress TEXT`: Hint that the backup is compressed in X format. Options: [ pigz ].
|
||||||
* `-P, --parallel INTEGER`: Determines number of decompression and mdbstream threads. Ignored if "-c/--compress" argument not set. [default: 4]
|
|
||||||
* `-q, --quiet / -no-q, --no-quiet`: Silence verbose copy command outputs. [default: no-q]
|
* `-q, --quiet / -no-q, --no-quiet`: Silence verbose copy command outputs. [default: no-q]
|
||||||
* `-nv-ssl, --no-verify-ssl / -v-ssl, --verify-ssl`: Skips verifying ssl certs, useful for onpremise s3 storage. [default: v-ssl]
|
* `-nv-ssl, --no-verify-ssl / -v-ssl, --verify-ssl`: Skips verifying ssl certs, useful for onpremise s3 storage. [default: v-ssl]
|
||||||
|
* `-li, --list`: List backups.
|
||||||
* `--help`: Show this message and exit.
|
* `--help`: Show this message and exit.
|
||||||
|
|
||||||
## `mcs dbrm_restore`
|
## `mcs dbrm_restore`
|
||||||
@ -150,11 +154,12 @@ $ mcs dbrm_restore [OPTIONS]
|
|||||||
|
|
||||||
**Options**:
|
**Options**:
|
||||||
|
|
||||||
* `-p, --path TEXT`: Path of where dbrm backups stored on disk. [default: /tmp/dbrm_backups]
|
* `-bl, --backup-location TEXT`: Path of where dbrm backups exist on disk. [default: /tmp/dbrm_backups]
|
||||||
* `-d, --directory TEXT`: Date or directory chose to restore from.
|
* `-l, --load TEXT`: Name of the directory to restore from -bl
|
||||||
* `-ns, --no-start`: Do not attempt columnstore startup post dbrm_restore.
|
* `-ns, --no-start`: Do not attempt columnstore startup post dbrm_restore.
|
||||||
* `-sdbk, --skip-dbrm-backup / -no-sdbk, --no-skip-dbrm-backup`: Skip backing up dbrms before restoring. [default: sdbk]
|
* `-sdbk, --skip-dbrm-backup / -no-sdbk, --no-skip-dbrm-backup`: Skip backing up dbrms before restoring. [default: sdbk]
|
||||||
* `-ssm, --skip-storage-manager / -no-ssm, --no-skip-storage-manager`: Skip backing up storagemanager directory. [default: ssm]
|
* `-ssm, --skip-storage-manager / -no-ssm, --no-skip-storage-manager`: Skip backing up storagemanager directory. [default: ssm]
|
||||||
|
* `-li, --list`: List backups.
|
||||||
* `--help`: Show this message and exit.
|
* `--help`: Show this message and exit.
|
||||||
|
|
||||||
## `mcs help-all`
|
## `mcs help-all`
|
||||||
|
@ -76,13 +76,6 @@ def backup(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
] = '',
|
] = '',
|
||||||
nv_ssl: Annotated[
|
|
||||||
bool,
|
|
||||||
typer.Option(
|
|
||||||
'-nv-ssl/-v-ssl','--no-verify-ssl/--verify-ssl',
|
|
||||||
help='Skips verifying ssl certs, useful for onpremise s3 storage.'
|
|
||||||
)
|
|
||||||
] = False,
|
|
||||||
s: Annotated[
|
s: Annotated[
|
||||||
str,
|
str,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
@ -107,6 +100,18 @@ def backup(
|
|||||||
show_default=False
|
show_default=False
|
||||||
)
|
)
|
||||||
] = '',
|
] = '',
|
||||||
|
P: Annotated[
|
||||||
|
int,
|
||||||
|
typer.Option(
|
||||||
|
'-P', '--parallel',
|
||||||
|
help=(
|
||||||
|
'Determines if columnstore data directories will have '
|
||||||
|
'multiple rsync running at the same time for different '
|
||||||
|
'subfolders to parallelize writes. '
|
||||||
|
'Ignored if "-c/--compress" argument not set.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
] = 4,
|
||||||
ha: Annotated[
|
ha: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
@ -171,53 +176,6 @@ def backup(
|
|||||||
help='Skip taking a copy of the columnstore data in the bucket.'
|
help='Skip taking a copy of the columnstore data in the bucket.'
|
||||||
)
|
)
|
||||||
] = False,
|
] = False,
|
||||||
pi: Annotated[
|
|
||||||
int,
|
|
||||||
typer.Option(
|
|
||||||
'-pi', '--poll-interval',
|
|
||||||
help=(
|
|
||||||
'Number of seconds between poll checks for active writes & '
|
|
||||||
'cpimports.'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
] = 5,
|
|
||||||
pmw: Annotated[
|
|
||||||
int,
|
|
||||||
typer.Option(
|
|
||||||
'-pmw', '--poll-max-wait',
|
|
||||||
help=(
|
|
||||||
'Max number of minutes for polling checks for writes to wait '
|
|
||||||
'before exiting as a failed backup attempt.'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
] = 60,
|
|
||||||
q: Annotated[
|
|
||||||
bool,
|
|
||||||
typer.Option(
|
|
||||||
'-q/-no-q', '--quiet/--no-quiet',
|
|
||||||
help='Silence verbose copy command outputs.'
|
|
||||||
)
|
|
||||||
] = False,
|
|
||||||
c: Annotated[
|
|
||||||
str,
|
|
||||||
typer.Option(
|
|
||||||
'-c', '--compress',
|
|
||||||
help='Compress backup in X format - Options: [ pigz ].',
|
|
||||||
show_default=False
|
|
||||||
)
|
|
||||||
] = '',
|
|
||||||
P: Annotated[
|
|
||||||
int,
|
|
||||||
typer.Option(
|
|
||||||
'-P', '--parallel',
|
|
||||||
help=(
|
|
||||||
'Determines if columnstore data directories will have '
|
|
||||||
'multiple rsync running at the same time for different '
|
|
||||||
'subfolders to parallelize writes. '
|
|
||||||
'Ignored if "-c/--compress" argument not set.'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
] = 4,
|
|
||||||
nb: Annotated[
|
nb: Annotated[
|
||||||
str,
|
str,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
@ -238,6 +196,48 @@ def backup(
|
|||||||
hidden=True
|
hidden=True
|
||||||
)
|
)
|
||||||
] = 'direct',
|
] = 'direct',
|
||||||
|
c: Annotated[
|
||||||
|
str,
|
||||||
|
typer.Option(
|
||||||
|
'-c', '--compress',
|
||||||
|
help='Compress backup in X format - Options: [ pigz ].',
|
||||||
|
show_default=False
|
||||||
|
)
|
||||||
|
] = '',
|
||||||
|
q: Annotated[
|
||||||
|
bool,
|
||||||
|
typer.Option(
|
||||||
|
'-q/-no-q', '--quiet/--no-quiet',
|
||||||
|
help='Silence verbose copy command outputs.'
|
||||||
|
)
|
||||||
|
] = False,
|
||||||
|
nv_ssl: Annotated[
|
||||||
|
bool,
|
||||||
|
typer.Option(
|
||||||
|
'-nv-ssl/-v-ssl','--no-verify-ssl/--verify-ssl',
|
||||||
|
help='Skips verifying ssl certs, useful for onpremise s3 storage.'
|
||||||
|
)
|
||||||
|
] = False,
|
||||||
|
pi: Annotated[
|
||||||
|
int,
|
||||||
|
typer.Option(
|
||||||
|
'-pi', '--poll-interval',
|
||||||
|
help=(
|
||||||
|
'Number of seconds between poll checks for active writes & '
|
||||||
|
'cpimports.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
] = 5,
|
||||||
|
pmw: Annotated[
|
||||||
|
int,
|
||||||
|
typer.Option(
|
||||||
|
'-pmw', '--poll-max-wait',
|
||||||
|
help=(
|
||||||
|
'Max number of minutes for polling checks for writes to wait '
|
||||||
|
'before exiting as a failed backup attempt.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
] = 60,
|
||||||
r: Annotated[
|
r: Annotated[
|
||||||
int,
|
int,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
@ -248,13 +248,23 @@ def backup(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
] = 0,
|
] = 0,
|
||||||
|
aro: Annotated[
|
||||||
|
bool,
|
||||||
|
typer.Option(
|
||||||
|
'-aro', '--apply-retention-only',
|
||||||
|
help=(
|
||||||
|
'Only apply retention policy to existing backups, '
|
||||||
|
'does not run a backup.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
] = False,
|
||||||
list: Annotated[
|
list: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
'list',
|
'-li', '--list',
|
||||||
help='List backups.'
|
help='List backups.'
|
||||||
)
|
)
|
||||||
] = False
|
] = False,
|
||||||
):
|
):
|
||||||
"""Backup Columnstore and/or MariDB data."""
|
"""Backup Columnstore and/or MariDB data."""
|
||||||
|
|
||||||
@ -286,16 +296,6 @@ def backup(
|
|||||||
|
|
||||||
@handle_output
|
@handle_output
|
||||||
def dbrm_backup(
|
def dbrm_backup(
|
||||||
m: Annotated[
|
|
||||||
str,
|
|
||||||
typer.Option(
|
|
||||||
'-m', '--mode',
|
|
||||||
help=(
|
|
||||||
'"loop" or "once" ; Determines if this script runs in a '
|
|
||||||
'forever loop sleeping -i minutes or just once.'
|
|
||||||
),
|
|
||||||
)
|
|
||||||
] = 'once',
|
|
||||||
i: Annotated[
|
i: Annotated[
|
||||||
int,
|
int,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
@ -320,6 +320,16 @@ def dbrm_backup(
|
|||||||
help='Path of where to save the dbrm backups on disk.'
|
help='Path of where to save the dbrm backups on disk.'
|
||||||
)
|
)
|
||||||
] = '/tmp/dbrm_backups',
|
] = '/tmp/dbrm_backups',
|
||||||
|
m: Annotated[
|
||||||
|
str,
|
||||||
|
typer.Option(
|
||||||
|
'-m', '--mode',
|
||||||
|
help=(
|
||||||
|
'"loop" or "once" ; Determines if this script runs in a '
|
||||||
|
'forever loop sleeping -i minutes or just once.'
|
||||||
|
),
|
||||||
|
)
|
||||||
|
] = 'once',
|
||||||
nb: Annotated[
|
nb: Annotated[
|
||||||
str,
|
str,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
@ -330,6 +340,13 @@ def dbrm_backup(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
] = 'dbrm_backup',
|
] = 'dbrm_backup',
|
||||||
|
ssm: Annotated[
|
||||||
|
bool,
|
||||||
|
typer.Option(
|
||||||
|
'-ssm/-no-ssm', '--skip-storage-manager/--no-skip-storage-manager',
|
||||||
|
help='Skip backing up storagemanager directory.'
|
||||||
|
)
|
||||||
|
] = False,
|
||||||
q: Annotated[
|
q: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
@ -337,11 +354,11 @@ def dbrm_backup(
|
|||||||
help='Silence verbose copy command outputs.'
|
help='Silence verbose copy command outputs.'
|
||||||
)
|
)
|
||||||
] = False,
|
] = False,
|
||||||
ssm: Annotated[
|
list: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
'-ssm/-no-ssm', '--skip-storage-manager/--no-skip-storage-manager',
|
'-li', '--list',
|
||||||
help='Skip backing up storagemanager directory.'
|
help='List backups.'
|
||||||
)
|
)
|
||||||
] = False,
|
] = False,
|
||||||
):
|
):
|
||||||
|
@ -78,18 +78,18 @@ Example: \[dq]s3://my\-cs\-backups\[dq]
|
|||||||
\fB\fC\-url, \-\-endpoint\-url TEXT\fR: Used by on premise S3 vendors.
|
\fB\fC\-url, \-\-endpoint\-url TEXT\fR: Used by on premise S3 vendors.
|
||||||
Example: \[dq]\[la]http://127.0.0.1:8000\[ra]\[dq]
|
Example: \[dq]\[la]http://127.0.0.1:8000\[ra]\[dq]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-nv\-ssl, \-\-no\-verify\-ssl / \-v\-ssl, \-\-verify\-ssl\fR: Skips verifying ssl certs, useful for onpremise s3 storage. [default: v\-ssl]
|
|
||||||
.IP \(bu 2
|
|
||||||
\fB\fC\-s, \-\-storage TEXT\fR: What storage topogoly is being used by Columnstore \- found in /etc/columnstore/storagemanager.cnf.
|
\fB\fC\-s, \-\-storage TEXT\fR: What storage topogoly is being used by Columnstore \- found in /etc/columnstore/storagemanager.cnf.
|
||||||
Options: \[dq]LocalStorage\[dq] or \[dq]S3\[dq] [default: LocalStorage]
|
Options: \[dq]LocalStorage\[dq] or \[dq]S3\[dq] [default: LocalStorage]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-i, \-\-incremental TEXT\fR: Adds columnstore deltas to an existing full backup. Backup folder to apply increment could be a value or \[dq]auto\fImost\fPrecent\[dq] \- the incremental backup applies to last full backup.
|
\fB\fC\-i, \-\-incremental TEXT\fR: Adds columnstore deltas to an existing full backup. Backup folder to apply increment could be a value or \[dq]auto\fImost\fPrecent\[dq] \- the incremental backup applies to last full backup.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
\fB\fC\-P, \-\-parallel INTEGER\fR: Determines if columnstore data directories will have multiple rsync running at the same time for different subfolders to parallelize writes. Ignored if \[dq]\-c/\-\-compress\[dq] argument not set. [default: 4]
|
||||||
|
.IP \(bu 2
|
||||||
\fB\fC\-ha, \-\-highavilability / \-no\-ha, \-\-no\-highavilability\fR: Hint wether shared storage is attached @ below on all nodes to see all data
|
\fB\fC\-ha, \-\-highavilability / \-no\-ha, \-\-no\-highavilability\fR: Hint wether shared storage is attached @ below on all nodes to see all data
|
||||||
HA LocalStorage ( /var/lib/columnstore/dataX/ )
|
HA LocalStorage ( /var/lib/columnstore/dataX/ )
|
||||||
HA S3 ( /var/lib/columnstore/storagemanager/ ) [default: no\-ha]
|
HA S3 ( /var/lib/columnstore/storagemanager/ ) [default: no\-ha]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-f, \-\-config\-file TEXT\fR: Path to backup configuration file to load variables from.
|
\fB\fC\-f, \-\-config\-file TEXT\fR: Path to backup configuration file to load variables from \- relative or full path accepted.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-sbrm, \-\-skip\-save\-brm / \-no\-sbrm, \-\-no\-skip\-save\-brm\fR: Skip saving brm prior to running a backup \- ideal for dirty backups. [default: no\-sbrm]
|
\fB\fC\-sbrm, \-\-skip\-save\-brm / \-no\-sbrm, \-\-no\-skip\-save\-brm\fR: Skip saving brm prior to running a backup \- ideal for dirty backups. [default: no\-sbrm]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
@ -101,20 +101,24 @@ HA S3 ( /var/lib/columnstore/storagemanager/ ) [default: no\-ha]
|
|||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-sb, \-\-skip\-bucket\-data / \-no\-sb, \-\-no\-skip\-bucket\-data\fR: Skip taking a copy of the columnstore data in the bucket. [default: no\-sb]
|
\fB\fC\-sb, \-\-skip\-bucket\-data / \-no\-sb, \-\-no\-skip\-bucket\-data\fR: Skip taking a copy of the columnstore data in the bucket. [default: no\-sb]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
\fB\fC\-nb, \-\-name\-backup TEXT\fR: Define the name of the backup \- default: $(date +%m\-%d\-%Y) [default: 03\-20\-2025]
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fC\-c, \-\-compress TEXT\fR: Compress backup in X format \- Options: [ pigz ].
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fC\-q, \-\-quiet / \-no\-q, \-\-no\-quiet\fR: Silence verbose copy command outputs. [default: no\-q]
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fC\-nv\-ssl, \-\-no\-verify\-ssl / \-v\-ssl, \-\-verify\-ssl\fR: Skips verifying ssl certs, useful for onpremise s3 storage. [default: v\-ssl]
|
||||||
|
.IP \(bu 2
|
||||||
\fB\fC\-pi, \-\-poll\-interval INTEGER\fR: Number of seconds between poll checks for active writes & cpimports. [default: 5]
|
\fB\fC\-pi, \-\-poll\-interval INTEGER\fR: Number of seconds between poll checks for active writes & cpimports. [default: 5]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-pmw, \-\-poll\-max\-wait INTEGER\fR: Max number of minutes for polling checks for writes to wait before exiting as a failed backup attempt. [default: 60]
|
\fB\fC\-pmw, \-\-poll\-max\-wait INTEGER\fR: Max number of minutes for polling checks for writes to wait before exiting as a failed backup attempt. [default: 60]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-q, \-\-quiet / \-no\-q, \-\-no\-quiet\fR: Silence verbose copy command outputs. [default: no\-q]
|
|
||||||
.IP \(bu 2
|
|
||||||
\fB\fC\-c, \-\-compress TEXT\fR: Compress backup in X format \- Options: [ pigz ].
|
|
||||||
.IP \(bu 2
|
|
||||||
\fB\fC\-P, \-\-parallel INTEGER\fR: Determines if columnstore data directories will have multiple rsync running at the same time for different subfolders to parallelize writes. Ignored if \[dq]\-c/\-\-compress\[dq] argument not set. [default: 4]
|
|
||||||
.IP \(bu 2
|
|
||||||
\fB\fC\-nb, \-\-name\-backup TEXT\fR: Define the name of the backup \- default: $(date +%m\-%d\-%Y) [default: 03\-06\-2025]
|
|
||||||
.IP \(bu 2
|
|
||||||
\fB\fC\-r, \-\-retention\-days INTEGER\fR: Retain backups created within the last X days, default 0 == keep all backups. [default: 0]
|
\fB\fC\-r, \-\-retention\-days INTEGER\fR: Retain backups created within the last X days, default 0 == keep all backups. [default: 0]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
\fB\fC\-aro, \-\-apply\-retention\-only\fR: Only apply retention policy to existing backups, does not run a backup.
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fC\-li, \-\-list\fR: List backups.
|
||||||
|
.IP \(bu 2
|
||||||
\fB\fC\-\-help\fR: Show this message and exit.
|
\fB\fC\-\-help\fR: Show this message and exit.
|
||||||
.RE
|
.RE
|
||||||
.SH \fB\fCmcs dbrm_backup\fR
|
.SH \fB\fCmcs dbrm_backup\fR
|
||||||
@ -132,19 +136,21 @@ $ mcs dbrm_backup [OPTIONS]
|
|||||||
\fBOptions\fP:
|
\fBOptions\fP:
|
||||||
.RS
|
.RS
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-m, \-\-mode TEXT\fR: \[dq]loop\[dq] or \[dq]once\[dq] ; Determines if this script runs in a forever loop sleeping \-i minutes or just once. [default: once]
|
|
||||||
.IP \(bu 2
|
|
||||||
\fB\fC\-i, \-\-interval INTEGER\fR: Number of minutes to sleep when \-\-mode=loop. [default: 90]
|
\fB\fC\-i, \-\-interval INTEGER\fR: Number of minutes to sleep when \-\-mode=loop. [default: 90]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-r, \-\-retention\-days INTEGER\fR: Retain dbrm backups created within the last X days, the rest are deleted [default: 7]
|
\fB\fC\-r, \-\-retention\-days INTEGER\fR: Retain dbrm backups created within the last X days, the rest are deleted [default: 7]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-p, \-\-path TEXT\fR: Path of where to save the dbrm backups on disk. [default: /tmp/dbrm_backups]
|
\fB\fC\-bl, \-\-backup\-location TEXT\fR: Path of where to save the dbrm backups on disk. [default: /tmp/dbrm_backups]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-nb, \-\-name\-backup TEXT\fR: Custom name to prefex dbrm backups with. [default: dbrm_backup]
|
\fB\fC\-m, \-\-mode TEXT\fR: \[dq]loop\[dq] or \[dq]once\[dq] ; Determines if this script runs in a forever loop sleeping \-i minutes or just once. [default: once]
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fC\-nb, \-\-name\-backup TEXT\fR: Define the prefix of the backup \- default: dbrm\fIbackup+date +%Y%m%d\fP%H%M%S [default: dbrm_backup]
|
||||||
|
.IP \(bu 2
|
||||||
|
\fB\fC\-ssm, \-\-skip\-storage\-manager / \-no\-ssm, \-\-no\-skip\-storage\-manager\fR: Skip backing up storagemanager directory. [default: no\-ssm]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-q, \-\-quiet / \-no\-q, \-\-no\-quiet\fR: Silence verbose copy command outputs. [default: no\-q]
|
\fB\fC\-q, \-\-quiet / \-no\-q, \-\-no\-quiet\fR: Silence verbose copy command outputs. [default: no\-q]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-ssm, \-\-skip\-storage\-manager / \-no\-ssm, \-\-no\-skip\-storage\-manager\fR: Skip backing up storagemanager directory. [default: no\-ssm]
|
\fB\fC\-li, \-\-list\fR: List backups.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-\-help\fR: Show this message and exit.
|
\fB\fC\-\-help\fR: Show this message and exit.
|
||||||
.RE
|
.RE
|
||||||
@ -195,11 +201,13 @@ Options: \[dq]LocalStorage\[dq] or \[dq]S3\[dq] [default: LocalStorage]
|
|||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-ns, \-\-new\-secret TEXT\fR: Defines the aws secret of the aws key to connect to the new_bucket.
|
\fB\fC\-ns, \-\-new\-secret TEXT\fR: Defines the aws secret of the aws key to connect to the new_bucket.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
\fB\fC\-P, \-\-parallel INTEGER\fR: Determines number of decompression and mdbstream threads. Ignored if \[dq]\-c/\-\-compress\[dq] argument not set. [default: 4]
|
||||||
|
.IP \(bu 2
|
||||||
\fB\fC\-ha, \-\-highavilability / \-no\-ha, \-\-no\-highavilability\fR: Flag for high available systems (meaning shared storage exists supporting the topology so that each node sees all data) [default: no\-ha]
|
\fB\fC\-ha, \-\-highavilability / \-no\-ha, \-\-no\-highavilability\fR: Flag for high available systems (meaning shared storage exists supporting the topology so that each node sees all data) [default: no\-ha]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-cont, \-\-continue / \-no\-cont, \-\-no\-continue\fR: This acknowledges data in your \-\-new\fIbucket is ok to delete when restoring S3. When set to true skips the enforcement that new\fPbucket should be empty prior to starting a restore. [default: no\-cont]
|
\fB\fC\-cont, \-\-continue / \-no\-cont, \-\-no\-continue\fR: This acknowledges data in your \-\-new\fIbucket is ok to delete when restoring S3. When set to true skips the enforcement that new\fPbucket should be empty prior to starting a restore. [default: no\-cont]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-f, \-\-config\-file TEXT\fR: Path to backup configuration file to load variables from.
|
\fB\fC\-f, \-\-config\-file TEXT\fR: Path to backup configuration file to load variables from \- relative or full path accepted.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-smdb, \-\-skip\-mariadb\-backup / \-no\-smdb, \-\-no\-skip\-mariadb\-backup\fR: Skip restoring mariadb server via mariadb\-backup \- ideal for only restoring columnstore. [default: no\-smdb]
|
\fB\fC\-smdb, \-\-skip\-mariadb\-backup / \-no\-smdb, \-\-no\-skip\-mariadb\-backup\fR: Skip restoring mariadb server via mariadb\-backup \- ideal for only restoring columnstore. [default: no\-smdb]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
@ -207,12 +215,12 @@ Options: \[dq]LocalStorage\[dq] or \[dq]S3\[dq] [default: LocalStorage]
|
|||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-c, \-\-compress TEXT\fR: Hint that the backup is compressed in X format. Options: [ pigz ].
|
\fB\fC\-c, \-\-compress TEXT\fR: Hint that the backup is compressed in X format. Options: [ pigz ].
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-P, \-\-parallel INTEGER\fR: Determines number of decompression and mdbstream threads. Ignored if \[dq]\-c/\-\-compress\[dq] argument not set. [default: 4]
|
|
||||||
.IP \(bu 2
|
|
||||||
\fB\fC\-q, \-\-quiet / \-no\-q, \-\-no\-quiet\fR: Silence verbose copy command outputs. [default: no\-q]
|
\fB\fC\-q, \-\-quiet / \-no\-q, \-\-no\-quiet\fR: Silence verbose copy command outputs. [default: no\-q]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-nv\-ssl, \-\-no\-verify\-ssl / \-v\-ssl, \-\-verify\-ssl\fR: Skips verifying ssl certs, useful for onpremise s3 storage. [default: v\-ssl]
|
\fB\fC\-nv\-ssl, \-\-no\-verify\-ssl / \-v\-ssl, \-\-verify\-ssl\fR: Skips verifying ssl certs, useful for onpremise s3 storage. [default: v\-ssl]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
\fB\fC\-li, \-\-list\fR: List backups.
|
||||||
|
.IP \(bu 2
|
||||||
\fB\fC\-\-help\fR: Show this message and exit.
|
\fB\fC\-\-help\fR: Show this message and exit.
|
||||||
.RE
|
.RE
|
||||||
.SH \fB\fCmcs dbrm_restore\fR
|
.SH \fB\fCmcs dbrm_restore\fR
|
||||||
@ -230,9 +238,9 @@ $ mcs dbrm_restore [OPTIONS]
|
|||||||
\fBOptions\fP:
|
\fBOptions\fP:
|
||||||
.RS
|
.RS
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-p, \-\-path TEXT\fR: Path of where dbrm backups stored on disk. [default: /tmp/dbrm_backups]
|
\fB\fC\-bl, \-\-backup\-location TEXT\fR: Path of where dbrm backups exist on disk. [default: /tmp/dbrm_backups]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-d, \-\-directory TEXT\fR: Date or directory chose to restore from.
|
\fB\fC\-l, \-\-load TEXT\fR: Name of the directory to restore from \-bl
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-ns, \-\-no\-start\fR: Do not attempt columnstore startup post dbrm_restore.
|
\fB\fC\-ns, \-\-no\-start\fR: Do not attempt columnstore startup post dbrm_restore.
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
@ -240,6 +248,8 @@ $ mcs dbrm_restore [OPTIONS]
|
|||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fB\fC\-ssm, \-\-skip\-storage\-manager / \-no\-ssm, \-\-no\-skip\-storage\-manager\fR: Skip backing up storagemanager directory. [default: ssm]
|
\fB\fC\-ssm, \-\-skip\-storage\-manager / \-no\-ssm, \-\-no\-skip\-storage\-manager\fR: Skip backing up storagemanager directory. [default: ssm]
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
|
\fB\fC\-li, \-\-list\fR: List backups.
|
||||||
|
.IP \(bu 2
|
||||||
\fB\fC\-\-help\fR: Show this message and exit.
|
\fB\fC\-\-help\fR: Show this message and exit.
|
||||||
.RE
|
.RE
|
||||||
.SH \fB\fCmcs help\-all\fR
|
.SH \fB\fCmcs help\-all\fR
|
||||||
|
@ -144,6 +144,16 @@ def restore(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
] = '',
|
] = '',
|
||||||
|
P: Annotated[
|
||||||
|
int,
|
||||||
|
typer.Option(
|
||||||
|
'-P', '--parallel',
|
||||||
|
help=(
|
||||||
|
'Determines number of decompression and mdbstream threads. '
|
||||||
|
'Ignored if "-c/--compress" argument not set.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
] = 4,
|
||||||
ha: Annotated[
|
ha: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
@ -221,16 +231,6 @@ def restore(
|
|||||||
show_default=False
|
show_default=False
|
||||||
)
|
)
|
||||||
] = '',
|
] = '',
|
||||||
P: Annotated[
|
|
||||||
int,
|
|
||||||
typer.Option(
|
|
||||||
'-P', '--parallel',
|
|
||||||
help=(
|
|
||||||
'Determines number of decompression and mdbstream threads. '
|
|
||||||
'Ignored if "-c/--compress" argument not set.'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
] = 4,
|
|
||||||
q: Annotated[
|
q: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
@ -248,7 +248,7 @@ def restore(
|
|||||||
list: Annotated[
|
list: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
'list',
|
'-li', '--list',
|
||||||
help='List backups.'
|
help='List backups.'
|
||||||
)
|
)
|
||||||
] = False
|
] = False
|
||||||
@ -318,7 +318,7 @@ def dbrm_restore(
|
|||||||
list: Annotated[
|
list: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
'list',
|
'-li', '--list',
|
||||||
help='List backups.'
|
help='List backups.'
|
||||||
)
|
)
|
||||||
] = False
|
] = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user