Skip to content

Commit f115a89

Browse files
authored
Merge pull request #141 from khoazero123/fix_postgres_restore
Fix postgres restore wrong db type
2 parents be34ceb + 8b8d243 commit f115a89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

install/usr/local/bin/restore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ get_dbtype() {
271271
parsed_type=true
272272
print_debug "Parsed DBType: MariaDB/MySQL"
273273
;;
274-
psql | postgres* )
274+
pgsql | postgres* )
275275
parsed_type=true
276276
print_debug "Parsed DBType: Postgresql"
277277
;;
@@ -908,7 +908,7 @@ case "${r_dbtype}" in
908908
pv ${r_filename} | ${decompress_cmd}cat | mysql -u${r_dbuser} -p${r_dbpass} -P${r_dbport} -h${r_dbhost} ${r_dbname}
909909
exit_code=$?
910910
;;
911-
psql | postgres* )
911+
pgsql | postgres* )
912912
print_info "Restoring '${r_filename}' into '${r_dbhost}'/'${r_dbname}'"
913913
export PGPASSWORD=${r_dbpass}
914914
pv ${r_filename} | ${decompress_cmd}cat | psql -d ${r_dbname} -h ${r_dbhost} -p ${r_dbport} -U ${r_dbuser}

0 commit comments

Comments
 (0)