Skip to content

Commit

Permalink
fixed user privileges template & dump
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinDo committed Nov 24, 2024
1 parent 900107f commit eb3b1b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file not shown.
8 changes: 4 additions & 4 deletions resources/backups/database_dumper/dump_database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ then
users_path=$SCRIPTPATH/dev/users
mkdir -p $users_path
users_name=users-$DATE.sql
mysql --host $DB_HOST --port $DB_PORT -u$DB_READ_ONLY -p$DB_READ_ONLY_PW -e "SHOW GRANTS FOR CURRENT_USER();" $DB_NAME | grep $DB_NAME | tr 'HerediVar_ahdoebm1' 'HerediVar' > $users_path/$users_name
mysql --host $DB_HOST --port $DB_PORT -u$DB_USER -p$DB_USER_PW -e "SHOW GRANTS FOR CURRENT_USER();" $DB_NAME | grep $DB_NAME | tr 'HerediVar_ahdoebm1' 'HerediVar' >> $users_path/$users_name
mysql --host $DB_HOST --port $DB_PORT -u$DB_SUPER_USER -p$DB_SUPER_USER_PW -e "SHOW GRANTS FOR CURRENT_USER();" $DB_NAME | grep $DB_NAME | tr 'HerediVar_ahdoebm1' 'HerediVar' >> $users_path/$users_name
mysql --host $DB_HOST --port $DB_PORT -u$DB_ANNOTATION_USER -p$DB_ANNOTATION_USER_PW -e "SHOW GRANTS FOR CURRENT_USER();" $DB_NAME | grep $DB_NAME | tr 'HerediVar_ahdoebm1' 'HerediVar' >> $users_path/$users_name
mysql --host $DB_HOST --port $DB_PORT -u$DB_READ_ONLY -p$DB_READ_ONLY_PW -e "SHOW GRANTS FOR CURRENT_USER();" $DB_NAME | grep $DB_NAME | sed "s/HerediVar_ahdoebm1/HerediVar/g" > $users_path/$users_name
mysql --host $DB_HOST --port $DB_PORT -u$DB_USER -p$DB_USER_PW -e "SHOW GRANTS FOR CURRENT_USER();" $DB_NAME | grep $DB_NAME | sed "s/HerediVar_ahdoebm1/HerediVar/g" >> $users_path/$users_name
mysql --host $DB_HOST --port $DB_PORT -u$DB_SUPER_USER -p$DB_SUPER_USER_PW -e "SHOW GRANTS FOR CURRENT_USER();" $DB_NAME | grep $DB_NAME | sed "s/HerediVar_ahdoebm1/HerediVar/g" >> $users_path/$users_name
mysql --host $DB_HOST --port $DB_PORT -u$DB_ANNOTATION_USER -p$DB_ANNOTATION_USER_PW -e "SHOW GRANTS FOR CURRENT_USER();" $DB_NAME | grep $DB_NAME | sed "s/HerediVar_ahdoebm1/HerediVar/g" >> $users_path/$users_name
gzip -f $users_path/$users_name


Expand Down

0 comments on commit eb3b1b3

Please sign in to comment.