Skip to content

ZFS recover-file <...> #17253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nodswal opened this issue Apr 17, 2025 · 2 comments
Open

ZFS recover-file <...> #17253

nodswal opened this issue Apr 17, 2025 · 2 comments
Labels
Type: Feature Feature request or new feature

Comments

@nodswal
Copy link

nodswal commented Apr 17, 2025

zfs recover-file fstab

Describe the feature would like to see added to OpenZFS

You can edit a file on a data set, sections of the modifed file on disk are kept and placed on a new section of the disk. so the original file still exist on disk, and multiple versions of the file if it is edited multiple times?

If those "versions" can be tracked.

You could then have file level snapshots that were every change of the file, until that section of the disk would get written to again.

you can then do
root@server > # zfs recover-file /etc/fstab
-2025-04-17 17:52:23
-2025-02-08 09:12:31
-2024-12-15 07:11:03

and it would list the versions still on disk.

each file would be like its own github repo, and every change would be like a new push.

Recover different steps of a modify file if it is still on a data set

How will this feature improve OpenZFS?

Allows data recovery for mistakes on a file system

Allows data recovery for mistakes on a file system

Additional context

it may be better to set a flag for a certain directory or file for this kind of action if there is to much overhead on this.

@nodswal nodswal added the Type: Feature Feature request or new feature label Apr 17, 2025
@amotin
Copy link
Member

amotin commented Apr 18, 2025

It is called snapshots and exist since ZFS was created.

@cookiEoverdose
Copy link

There are scripts and tools out there to facilitate working with snapshots and files (like https://github.com/markusressel/zfs-file-history) but I never used them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

3 participants