refactor: remove delete option until we have a proper dry-run mode
This commit is contained in:
parent
71f72bd09b
commit
6d33a3a35e
2 changed files with 0 additions and 17 deletions
|
|
@ -37,7 +37,6 @@ export function RestoreForm({ snapshot, repository, snapshotId, returnPath }: Re
|
|||
const [overwriteMode, setOverwriteMode] = useState<OverwriteMode>("always");
|
||||
const [showAdvanced, setShowAdvanced] = useState(false);
|
||||
const [excludeXattr, setExcludeXattr] = useState("");
|
||||
const [deleteExtraFiles, setDeleteExtraFiles] = useState(false);
|
||||
|
||||
const [selectedPaths, setSelectedPaths] = useState<Set<string>>(new Set());
|
||||
|
||||
|
|
@ -125,7 +124,6 @@ export function RestoreForm({ snapshot, repository, snapshotId, returnPath }: Re
|
|||
body: {
|
||||
snapshotId,
|
||||
include: includePaths.length > 0 ? includePaths : undefined,
|
||||
delete: deleteExtraFiles,
|
||||
excludeXattr: excludeXattrArray && excludeXattrArray.length > 0 ? excludeXattrArray : undefined,
|
||||
targetPath,
|
||||
overwrite: overwriteMode,
|
||||
|
|
@ -139,7 +137,6 @@ export function RestoreForm({ snapshot, repository, snapshotId, returnPath }: Re
|
|||
customTargetPath,
|
||||
selectedPaths,
|
||||
addBasePath,
|
||||
deleteExtraFiles,
|
||||
overwriteMode,
|
||||
restoreSnapshot,
|
||||
]);
|
||||
|
|
@ -262,16 +259,6 @@ export function RestoreForm({ snapshot, repository, snapshotId, returnPath }: Re
|
|||
Exclude specific extended attributes during restore (comma-separated)
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox
|
||||
id="delete-extra"
|
||||
checked={deleteExtraFiles}
|
||||
onCheckedChange={(checked) => setDeleteExtraFiles(checked === true)}
|
||||
/>
|
||||
<Label htmlFor="delete-extra" className="text-sm font-normal cursor-pointer">
|
||||
Delete files not present in the snapshot
|
||||
</Label>
|
||||
</div>
|
||||
</CardContent>
|
||||
)}
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -406,10 +406,6 @@ const restore = async (
|
|||
args.push("--overwrite", options.overwrite);
|
||||
}
|
||||
|
||||
if (options?.delete) {
|
||||
args.push("--delete");
|
||||
}
|
||||
|
||||
if (options?.include?.length) {
|
||||
for (const pattern of options.include) {
|
||||
args.push("--include", pattern);
|
||||
|
|
|
|||
Loading…
Reference in a new issue