Skip to contentSkip to conversation

How to view transaction log chronologically, human-readable?

DISCUSSION Marcel Partap 2 participants 5 messages Mar 1, 2014 – Apr 23, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Dear BTFRS devs,
I have a 1TB btrfs volume mounted read-only since two years because I deleted a bunch of files and didn't want to give up on them. Now with latest btrfs-find-root and btrfs restore --dry-run -t in a loop, I generated the full list of files contained in the last several hundred root trees. However, diffing these, I find the current one being the same until 94 root trees back, and the ones before contain earlier changes. Maybe by my own fault that is..whatever.

Is there a way to just view the transaction history in a human-readable way?

#Regards

#1 lore raw

[...]
Theoretically, there should be someone on this mailing list capable of answering this question, no?
Please feel invited to share your insights ;)
#Regards

Quoted 13 lines · Marcel Partap

Dear BTFRS devs,
I have a 1TB btrfs volume mounted read-only since two years because I deleted a bunch of files and didn't want to give up on them. Now with latest btrfs-find-root and btrfs restore --dry-run -t in a loop, I generated the full list of files contained in the last several hundred root trees. However, diffing these, I find the current one being the same until 94 root trees back, and the ones before contain earlier changes. Maybe by my own fault that is..whatever.

Is there a way to just view the transaction history in a human-readable way?

#Regards

#2 lore raw

This is the BTRFS development list, right? Someone here should know how to achieve this I hope?
#Regards

Quoted 14 lines · Marcel Partap
Quoted 13 lines

Dear BTFRS devs,
I have a 1TB btrfs volume mounted read-only since two years because I deleted a bunch of files and didn't want to give up on them. Now with latest btrfs-find-root and btrfs restore --dry-run -t in a loop, I generated the full list of files contained in the last several hundred root trees. However, diffing these, I find the current one being the same until 94 root trees back, and the ones before contain earlier changes. Maybe by my own fault that is..whatever.

Is there a way to just view the transaction history in a human-readable way?

#Regards

#3 lore raw
Quoted 18 lines · Marcel Partap

This is the BTRFS development list, right? Someone here should know how to achieve this I hope?
#Regards

Quoted 14 lines · Marcel Partap
Quoted 13 lines

Dear BTFRS devs,
I have a 1TB btrfs volume mounted read-only since two years because I deleted a bunch of files and didn't want to give up on them. Now with latest btrfs-find-root and btrfs restore --dry-run -t in a loop, I generated the full list of files contained in the last several hundred root trees. However, diffing these, I find the current one being the same until 94 root trees back, and the ones before contain earlier changes. Maybe by my own fault that is..whatever.

Is there a way to just view the transaction history in a human-readable way?

#Regards

I am not a "dev", but since BTRFS utilizes a COW (Copy On Write) architecture, it doesn't keep a journal or history of transactions that can be unwound.

With respect to un-deleting files on BTRFS, the btrfs-find-root/'btrfs restore' combination are the most effective user-space tools I know of.

It sounds like you've effectively tried this manually, but here's a link to an btrfs undelete script that also makes use of btrfs-find-root and 'btrfs restore':

http://comments.gmane.org/gmane.comp.file-systems.btrfs/22560

#4 lore raw
Quoted 3 lines

I am not a "dev", but since BTRFS utilizes a COW (Copy On Write) architecture, it doesn't keep a journal or history of transactions that can be unwound.

Ok, thanks for making that clear, I wasn't aware of that. But shouldn't the chain of recent root trees kinda allow similar functionality?

Quoted 3 lines

It sounds like you've effectively tried this manually, but here's a link to an btrfs undelete script that also makes use of btrfs-find-root and 'btrfs restore':

Actually I was using that script as a starting point.. Unfortunately, the files I was looking for were nowhere to be found..

Quoted 1 line

From a journal-type functionality I was hoping for a way to actually see

the most recent file system actions..
Is there no hope to recreate that information from the roots btrfs-find-root comes up with?

#Regards