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