mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-09-14 11:06:15 +05:00
feat: browse backup files across all destination types
This commit is contained in:
parent
549d7de528
commit
55dccaddfa
@ -32,7 +32,7 @@ import { findDestinationById } from "@dokploy/server/services/destination";
|
||||
import { checkServicePermissionAndAccess } from "@dokploy/server/services/permission";
|
||||
import { runComposeBackup } from "@dokploy/server/utils/backups/compose";
|
||||
import {
|
||||
getS3Credentials,
|
||||
getRclonePathAndFlags,
|
||||
normalizeS3Path,
|
||||
} from "@dokploy/server/utils/backups/utils";
|
||||
import {
|
||||
@ -497,8 +497,6 @@ export const backupRouter = createTRPCRouter({
|
||||
});
|
||||
}
|
||||
}
|
||||
const rcloneFlags = getS3Credentials(destination);
|
||||
const bucketPath = `:s3:${destination.bucket}`;
|
||||
|
||||
const lastSlashIndex = input.search.lastIndexOf("/");
|
||||
const baseDir =
|
||||
@ -509,8 +507,8 @@ export const backupRouter = createTRPCRouter({
|
||||
lastSlashIndex !== -1
|
||||
? input.search.slice(lastSlashIndex + 1)
|
||||
: input.search;
|
||||
|
||||
const searchPath = baseDir ? `${bucketPath}/${baseDir}` : bucketPath;
|
||||
const { flags: rcloneFlags, path: searchPath } =
|
||||
await getRclonePathAndFlags(destination, baseDir);
|
||||
const listCommand = `rclone lsjson ${rcloneFlags.join(" ")} ${quote([searchPath])} --no-mimetype --no-modtime 2>/dev/null`;
|
||||
|
||||
let stdout = "";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user