Skip to content

Commit 0c64565

Browse files
committed
add example for Minimal grants for backup user
Signed-off-by: Slach <[email protected]>
1 parent 695cec5 commit 0c64565

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Examples.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,3 +969,26 @@ while true; do
969969
sleep 5
970970
done
971971
```
972+
973+
## Minimal grants for backup user
974+
975+
Better use maximum grants, but minimal grants is here (could fail with restore RBAC objects)
976+
977+
```sql
978+
CREATE ROLE IF NOT EXISTS backup_role;
979+
980+
GRANT SELECT ON system.* TO backup_role;
981+
GRANT INSERT ON system.backup_actions TO backup_role;
982+
983+
GRANT ALTER FREEZE PARTITION ON *.* TO backup_role;
984+
GRANT ALTER FETCH PARTITION ON *.* TO backup_role;
985+
986+
GRANT CREATE TABLE ON *.* TO backup_role;
987+
GRANT DROP TABLE ON *.* TO backup_role;
988+
989+
GRANT DROP DATABASE ON *.* TO backup_role;
990+
GRANT CREATE DATABASE ON *.* TO backup_role;
991+
992+
CREATE USER IF NOT EXISTS backup_user IDENTIFIED WITH sha256_password BY 'YourStrongP@ssw0rd!';
993+
CREATE GRANT backup_role TO backup_user;
994+
```

0 commit comments

Comments
 (0)