clickhouse-backup icon indicating copy to clipboard operation
clickhouse-backup copied to clipboard

add flags --configs --rbac in clickhouse-backup server --watch command

Open joserocha opened this issue 1 year ago • 2 comments

Hello,

I'm trying to start the API server using the '--watch' flag, but everytime I try to use the flag --configs, I receive this error. Is it possible to backup the config files + RBAC + data files ?

sudo -u clickhouse /usr/local/bin/clickhouse-backup server --watch --watch-interval 1h --full-interval 24h --watch-backup-name-template {type}_{time:2001-01-01T00:00:0
0Z} --configs
Incorrect Usage: flag provided but not defined: -configs

NAME:
   clickhouse-backup server - Run API server

USAGE:
   clickhouse-backup server [command options] [arguments...]

OPTIONS:
   --config value, -c value                   Config 'FILE' name. (default: "/etc/clickhouse-backup/config.yml") [$CLICKHOUSE_BACKUP_CONFIG]
   --environment-override value, --env value  override any environment variable via CLI parameter
   --watch                                    Run watch go-routine for 'create_remote' + 'delete local', after API server startup
   --watch-interval value                     Interval for run 'create_remote' + 'delete local' for incremental backup, look format https://pkg.go.dev/time#ParseDuration
   --full-interval value                      Interval for run 'create_remote'+'delete local' when stop create incremental backup sequence and create full backup, look format https://pkg.go.dev/time#ParseDuration
   --watch-backup-name-template value         Template for new backup name, could contain names from system.macros, {type} - full or incremental and {time:LAYOUT}, look to https://go.dev/src/time/format.go for layout examples

2024/07/18 02:41:04.005467 error flag provided but not defined: -configs
```

joserocha avatar Jul 18 '24 05:07 joserocha

currently watch command backuped only data and not backup --rbac and --configs

Slach avatar Jul 18 '24 07:07 Slach

as a workaround you could run clickhouse-backup server without watch and implements cron script which will execute create_remote --diff-from-remote + delete local command sequences

Slach avatar Jul 18 '24 08:07 Slach