Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joserocha opened this issue Jul 18, 2024 · 2 comments
Open
Assignees
Milestone

Comments

@joserocha
Copy link

joserocha commented Jul 18, 2024

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
```
@Slach
Copy link
Collaborator

Slach commented Jul 18, 2024

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

@Slach Slach added this to the 2.6.0 milestone Jul 18, 2024
@Slach Slach self-assigned this Jul 18, 2024
@Slach Slach changed the title Flag --configs in API server add flags --configs --rbac in clickhouse-backup server --watch command Jul 18, 2024
@Slach
Copy link
Collaborator

Slach commented Jul 18, 2024

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 Slach modified the milestones: 2.6.0, 2.6.1 Aug 28, 2024
@Slach Slach modified the milestones: 2.6.2, 2.6.3 Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants