mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-18 04:59:31 +00:00
copy to persisten storage
This commit is contained in:
@@ -1972,11 +1972,15 @@ export async function backupDatabaseNow(database, reply) {
|
|||||||
dockerId: database.destinationDockerId,
|
dockerId: database.destinationDockerId,
|
||||||
command,
|
command,
|
||||||
});
|
});
|
||||||
const copyCommand = `docker cp ${database.id}:${backupFileName} ${backupStorageFilename}`
|
const copyCommand = `docker cp ${database.id}:${backupFileName} ${backupFileName}`
|
||||||
await executeCommand({
|
await executeCommand({
|
||||||
dockerId: database.destinationDockerId,
|
dockerId: database.destinationDockerId,
|
||||||
command: copyCommand
|
command: copyCommand
|
||||||
});
|
});
|
||||||
|
await executeCommand({
|
||||||
|
dockerId: database.destinationDockerId,
|
||||||
|
command: `docker cp ${database.id}:${backupFileName} /app/backups/`
|
||||||
|
});
|
||||||
const stream = fsNormal.createReadStream(backupFileName);
|
const stream = fsNormal.createReadStream(backupFileName);
|
||||||
reply.header('Content-Type', 'application/octet-stream');
|
reply.header('Content-Type', 'application/octet-stream');
|
||||||
reply.header('Content-Disposition', `attachment; filename=${fileName}`);
|
reply.header('Content-Disposition', `attachment; filename=${fileName}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user