[FEATURE] Backup Database sync
This commit is contained in:
parent
b538ab5089
commit
7d34fcfce8
7 changed files with 79 additions and 15 deletions
|
@ -20,6 +20,7 @@ export async function createServerEntry(serverSpec) {
|
|||
backupBucket: backup_bucket_path,
|
||||
backupId: backup_id,
|
||||
backupKey: backup_key,
|
||||
backupInterval: backup_interval,
|
||||
} = serverSpec;
|
||||
var q = insertQuery(table, {
|
||||
name,
|
||||
|
@ -31,6 +32,7 @@ export async function createServerEntry(serverSpec) {
|
|||
backup_bucket_path,
|
||||
backup_id,
|
||||
backup_key,
|
||||
backup_interval,
|
||||
});
|
||||
q += "\n RETURNING *";
|
||||
try {
|
||||
|
@ -71,9 +73,28 @@ export async function getServerEntry(serverId) {
|
|||
version,
|
||||
server_type: serverType,
|
||||
memory,
|
||||
backup_host: backupHost,
|
||||
backup_bucket_path: backupPath,
|
||||
backup_id: backupId,
|
||||
backup_key: backupKey,
|
||||
backup_interval: backupInterval,
|
||||
} = serverSpecs[0];
|
||||
const mclName = getMclName(host, id);
|
||||
return { name, mclName, id, host, version, serverType, memory };
|
||||
return {
|
||||
name,
|
||||
mclName,
|
||||
id,
|
||||
host,
|
||||
version,
|
||||
serverType,
|
||||
memory,
|
||||
backupHost,
|
||||
backupPath,
|
||||
backupId,
|
||||
backupKey,
|
||||
backupInterval
|
||||
|
||||
};
|
||||
} catch (e) {
|
||||
asExpressClientError(e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue