Altinity / clickhouse-backup

Tool for easy backup and restore for ClickHouse® using object storage for backup files.
https://altinity.com
Other
1.29k stars 227 forks source link

Upload exiting "silently" with no errors when REMOTE_STORAGE is not defined #375

Closed ercanucan closed 2 years ago

ercanucan commented 2 years ago

Hi @Slach,

We've been using clickhouse-backup for some time and recently found out that our backups to s3 were not taking place. We have then realized that we did not set the REMOTE_STORAGE="s3" (which was defaulting to none).

We see that the Upload function is exiting silently without any errors, if the remote storage is not set.

We mean the following line here: https://github.com/AlexAkulov/clickhouse-backup/blob/master/pkg/backup/upload.go#L32

Was this a deliberate choice to exit "silently" without errors if remote storage is not set? This causes some difficulties in automated backup environments as the commands executed do not return with an exit code.

If this was not a deliberate choice, please let me know and I'll submit a PR.

Thanks!

(might also be related to https://github.com/AlexAkulov/clickhouse-backup/issues/365)

/cc @max-wittig @dlouzan @bufferoverflow

Slach commented 2 years ago

Issue is not related to #365 but thanks for reporting, we will return error and non zero exit code for remote_storage=none corner case on 1.3.0 release

ercanucan commented 2 years ago

@Slach great! thanks a lot for the quick response and the clarification!