-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #340, properly handle errors on S3 during Walk() and delete old b…
…ackup
- Loading branch information
Showing
15 changed files
with
130 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
general: | ||
disable_progress_bar: true | ||
remote_storage: s3 | ||
upload_concurrency: 4 | ||
download_concurrency: 4 | ||
skip_tables: | ||
- " system.*" | ||
- "INFORMATION_SCHEMA.*" | ||
- "information_schema.*" | ||
restore_schema_on_cluster: "cluster" | ||
clickhouse: | ||
host: 127.0.0.1 | ||
port: 9440 | ||
username: backup | ||
password: meow=& 123?*%# МЯУ | ||
secure: true | ||
skip_verify: true | ||
sync_replicated_tables: true | ||
timeout: 1s | ||
restart_command: bash -c 'echo "FAKE RESTART"' | ||
s3: | ||
access_key: nodelete | ||
secret_key: nodelete_password | ||
bucket: clickhouse | ||
endpoint: http://minio:9000 | ||
acl: private | ||
force_path_style: true | ||
path: backup | ||
disable_ssl: true | ||
compression_format: tar | ||
api: | ||
listen: :7171 | ||
create_integration_tables: true | ||
allow_parallel: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
set -x | ||
set -e | ||
mc alias list | ||
|
||
mc admin user add local nodelete nodelete_password | ||
|
||
mc admin policy add local nodelete <( cat << EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Deny", | ||
"Action": [ | ||
"s3:DeleteObject" | ||
], | ||
"Resource": [ | ||
"arn:aws:s3:::clickhouse/*" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"s3:*" | ||
], | ||
"Resource": [ | ||
"arn:aws:s3:::clickhouse/*" | ||
] | ||
} | ||
] | ||
} | ||
EOF | ||
) | ||
|
||
mc admin policy set local nodelete user=nodelete | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/bash | ||
date | ||
if [[ ! -d /hdd1_data ]]; then | ||
mkdir -pv /hdd1_data | ||
fi | ||
|