We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff8cc8c commit 66265acCopy full SHA for 66265ac
1 file changed
assets/runtime/functions
@@ -800,8 +800,10 @@ backup_restore_database() {
800
;;
801
sqlite3)
802
echo "Restoring SQLite database..."
803
- gzip -dc "${config_default_backup_storage_path}/database.sql.gz" | \
804
- sqlite3 "${database_production_database}"
+ exec_as_redmine mkdir -p "$(dirname "${database_production_database}")"
+ # Remove old database
805
+ exec_as_redmine rm -f "${database_production_database}"
806
+ exec_as_redmine bash -lc "gzip -dc \"${config_default_backup_storage_path}/database.sql.gz\" | sqlite3 \"${database_production_database}\""
807
808
*)
809
echo "Database type ${database_production_adapter} not supported."
0 commit comments