mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix(dokploy): add missing --archive to mongodump
This commit is contained in:
@@ -29,7 +29,7 @@ export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => {
|
|||||||
mongo.serverId,
|
mongo.serverId,
|
||||||
appName,
|
appName,
|
||||||
);
|
);
|
||||||
const mongoDumpCommand = `docker exec ${containerId} sh -c "mongodump -d '${database}' -u '${databaseUser}' -p '${databasePassword}' --authenticationDatabase=admin --gzip"`;
|
const mongoDumpCommand = `docker exec ${containerId} sh -c "mongodump -d '${database}' -u '${databaseUser}' -p '${databasePassword}' --archive --authenticationDatabase=admin --gzip"`;
|
||||||
|
|
||||||
await execAsyncRemote(
|
await execAsyncRemote(
|
||||||
mongo.serverId,
|
mongo.serverId,
|
||||||
@@ -37,7 +37,7 @@ export const runMongoBackup = async (mongo: Mongo, backup: BackupSchedule) => {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
const { Id: containerId } = await getServiceContainer(appName);
|
const { Id: containerId } = await getServiceContainer(appName);
|
||||||
const mongoDumpCommand = `docker exec ${containerId} sh -c "mongodump -d '${database}' -u '${databaseUser}' -p '${databasePassword}' --authenticationDatabase=admin --gzip"`;
|
const mongoDumpCommand = `docker exec ${containerId} sh -c "mongodump -d '${database}' -u '${databaseUser}' -p '${databasePassword}' --archive --authenticationDatabase=admin --gzip"`;
|
||||||
await execAsync(`${mongoDumpCommand} | ${rcloneCommand}`);
|
await execAsync(`${mongoDumpCommand} | ${rcloneCommand}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user