mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-21 21:33:28 +01:00
Fix postgres restore wrong db type
This commit is contained in:
@@ -271,7 +271,7 @@ get_dbtype() {
|
|||||||
parsed_type=true
|
parsed_type=true
|
||||||
print_debug "Parsed DBType: MariaDB/MySQL"
|
print_debug "Parsed DBType: MariaDB/MySQL"
|
||||||
;;
|
;;
|
||||||
psql | postgres* )
|
pgsql | postgres* )
|
||||||
parsed_type=true
|
parsed_type=true
|
||||||
print_debug "Parsed DBType: Postgresql"
|
print_debug "Parsed DBType: Postgresql"
|
||||||
;;
|
;;
|
||||||
@@ -908,7 +908,7 @@ case "${r_dbtype}" in
|
|||||||
pv ${r_filename} | ${decompress_cmd}cat | mysql -u${r_dbuser} -p${r_dbpass} -P${r_dbport} -h${r_dbhost} ${r_dbname}
|
pv ${r_filename} | ${decompress_cmd}cat | mysql -u${r_dbuser} -p${r_dbpass} -P${r_dbport} -h${r_dbhost} ${r_dbname}
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
;;
|
;;
|
||||||
psql | postgres* )
|
pgsql | postgres* )
|
||||||
print_info "Restoring '${r_filename}' into '${r_dbhost}'/'${r_dbname}'"
|
print_info "Restoring '${r_filename}' into '${r_dbhost}'/'${r_dbname}'"
|
||||||
export PGPASSWORD=${r_dbpass}
|
export PGPASSWORD=${r_dbpass}
|
||||||
pv ${r_filename} | ${decompress_cmd}cat | psql -d ${r_dbname} -h ${r_dbhost} -p ${r_dbport} -U ${r_dbuser}
|
pv ${r_filename} | ${decompress_cmd}cat | psql -d ${r_dbname} -h ${r_dbhost} -p ${r_dbport} -U ${r_dbuser}
|
||||||
|
|||||||
Reference in New Issue
Block a user