MCPcopy
hub / github.com/Dokploy/dokploy / runRestore

Function runRestore

apps/dokploy/server/api/routers/backup.ts:567–591  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

565 let done = false;
566 const onLog = (log: string) => queue.push(log);
567 const runRestore = async () => {
568 if (input.backupType === "database") {
569 if (input.databaseType === "postgres") {
570 const postgres = await findPostgresById(input.databaseId);
571 await restorePostgresBackup(postgres, destination, input, onLog);
572 } else if (input.databaseType === "mysql") {
573 const mysql = await findMySqlById(input.databaseId);
574 await restoreMySqlBackup(mysql, destination, input, onLog);
575 } else if (input.databaseType === "mariadb") {
576 const mariadb = await findMariadbById(input.databaseId);
577 await restoreMariadbBackup(mariadb, destination, input, onLog);
578 } else if (input.databaseType === "mongo") {
579 const mongo = await findMongoById(input.databaseId);
580 await restoreMongoBackup(mongo, destination, input, onLog);
581 } else if (input.databaseType === "libsql") {
582 const libsql = await findLibsqlById(input.databaseId);
583 await restoreLibsqlBackup(libsql, destination, input, onLog);
584 } else if (input.databaseType === "web-server") {
585 await restoreWebServerBackup(destination, input.backupFile, onLog);
586 }
587 } else if (input.backupType === "compose") {
588 const compose = await findComposeById(input.databaseId);
589 await restoreComposeBackup(compose, destination, input, onLog);
590 }
591 };
592 runRestore()
593 .catch((error) => {
594 onLog(

Callers 1

backup.tsFile · 0.70

Calls 13

findPostgresByIdFunction · 0.90
restorePostgresBackupFunction · 0.90
findMySqlByIdFunction · 0.90
restoreMySqlBackupFunction · 0.90
findMariadbByIdFunction · 0.90
restoreMariadbBackupFunction · 0.90
findMongoByIdFunction · 0.90
restoreMongoBackupFunction · 0.90
findLibsqlByIdFunction · 0.90
restoreLibsqlBackupFunction · 0.90
restoreWebServerBackupFunction · 0.90
findComposeByIdFunction · 0.90

Tested by

no test coverage detected