feat: selectable database to backup

This can be used to select database exclude system database which will
cause error on import.
This commit is contained in:
Methapon2001 2024-07-16 13:31:32 +07:00
parent f0aba4dd9a
commit c963c040ef
2 changed files with 28 additions and 4 deletions

View file

@ -19,6 +19,7 @@ const DB_HOST = getEnvVar("DB_HOST");
const DB_PORT = process.env.DB_PORT;
const DB_USERNAME = getEnvVar("DB_USERNAME");
const DB_PASSWORD = getEnvVar("DB_PASSWORD");
const DB_LIST = process.env.DB_LIST;
const MAIN_MINIO_USE_SSL = getEnvVar("MAIN_MINIO_USE_SSL");
const MAIN_MINIO_HOST = getEnvVar("MAIN_MINIO_HOST");
const MAIN_MINIO_PORT = process.env.MAIN_MINIO_PORT;
@ -141,6 +142,7 @@ export class BackupController extends Controller {
db_port: DB_PORT,
db_user: DB_USERNAME,
db_password: DB_PASSWORD,
db_list: DB_LIST?.replace(",", " "),
},
}),
},