You are not logged in.

#1 2014-09-21 04:14:21

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

[SOLVED] Where are snapper snapshots stored?

Recently I've been playing with the snapper tool. I've followed the Wiki to set up automatic snapshots, and this is working okay.

My doubt is: where are these snapshots stored? As far as I know, btrfs snapshots are nothing more than subvolumes; in this case, I concluded they should be stored somewhere in the filesystem, right? So...where? I skimmed through the snapper and snapper-configs man pages, but I couldn't find anything relevant.

Just to be clear and not cause a XY problem, I want to find this so I can access a file in a snapshot anytime, from anywhere. For example, say I want to access a file called .emacs from a day ago (this is just an example!). I don't want to fully rollback to a day ago just to access this file; what I want is to access it from the filesystem, say, as /path/to/snapshot/from/a/day/ago/home/thiago/.emacs. If I had created a snapshot manually (with 'btrfs subvolume snapshot'), I would knew the path where I created it; that's why I want to know where are the snapper snapshots stored by default.

More details? I have two btrfs partitions, one for root (/) and another one for /home. Snapper is configured on both of them, with almost the same defaults as the Wiki.

edit: clarification

Last edited by thiagowfx (2014-09-21 04:57:19)

Offline

#2 2014-09-21 04:56:20

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: [SOLVED] Where are snapper snapshots stored?

They are stored in $BTRFS_ROOT/.snapshots or more precisely the subvolume path is $BTRFS_ROOT/.snapshots/$SNAPHOST_ID/snapshot

Also see output of 'sudo btrfs subvolume list $BTRFS_ROOT'  it will show you list of all subvolumes for the filesystem.


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#3 2014-09-21 04:56:52

thiagowfx
Member
Registered: 2013-07-09
Posts: 586

Re: [SOLVED] Where are snapper snapshots stored?

OK, I've just found them:

root (/) snapshots are stored into /.snapshots
and /home snapshots are stored into /home/.snapshots

It looks so simple now...I've found them after doing:

btrfs subvolume list /
btrfs subvolume list /home

Edit2: Tomorrow I'll add this info to our wiki. Added.

Edit: thanks anyway anatolik, we posted almost at the same time.

Last edited by thiagowfx (2014-09-21 13:59:51)

Offline

Board footer

Powered by FluxBB