Backgroud: Running XBian (Debian ARM distribution for Raspberry Pi), which uses BTRFS. I fragged my system and decided to start over. However, I ripped the image from the root filesystem device before starting fresh.
I have a running BTRFS system, and an image (raw filesystem data) file which contains the data from a previous installation. I want to access the data from this image file to restore configuration and things like that. So, I mount this image with the following command (I found the offset with fdisk /path/to/image.img, print, and then multiplied the start sector by 512, the sector size - e.g. start sector 10000, offset = 512*10000 = 5120000):
mount -t btrfs -o loop,offset=5120000 /path/to/image.img /mnt/prev-image
After this command, I see that (at /mnt/prev-image/) the filesystem doesn't look as straightforward as ext2 or other traditional filesystems. I am probably having a misunderstanding at this point, or with the mount command.
When I try to access a file from the image, say my Samba configuration, I navigate to /mnt/prev-image/root/@/etc/samba/smb.conf. But, I notice that I'm seeing the same filesystem as my main filesystem and that the smb.conf file I access is the same as my current Samba configuration in /etc/samba/smb.conf. I think BTRFS is treating the data in the image file as a baseline snapshot for my base system, and serving me the "latest" smb.conf file, which comes from my fresh installation.
I want to know how to access the data from the image file, and where my misunderstandings lie.