On Thu, Jan 6, 2011 at 1:42 PM, Carl Cook <CACook@xxxxxxxxxxxxxxx> wrote: > On Thu 06 January 2011 11:16:49 Freddie Cash wrote: >> > Also with this system, I'm concerned that if there is corruption on the HTPC, it could be propagated to the backup server. ÂIs there some way to address this? ÂLonger intervals to sync, so I have a chance to discover? >> >> Using snapshots on the backup server allows you to go back in time to >> recover files that may have been accidentally deleted, or to recover >> files that have been corrupted. > > How? ÂI can see that rsync will not transfer the files that have not changed, but I assume it transfers the changed ones. ÂHow can you go back in time? ÂIs there like a snapshot file that records the state of all files there? I don't know the specifics of how it works in btrfs, but it should be similar to how ZFS does it. The gist of it is: Each snapshot gives you a point-in-time view of the entire filesystem. Each snapshot can be mounted (ZFS is read-only; btrfs is read-only or read-write). So, you mount the snapshot for 2010-12-15 onto /mnt, then cd to the directory you want (/mnt/htpc/home/fcash/videos/) and copy the file out that you want to restore (cp coolvid.avi ~/). With ZFS, things are nice and simple: - each filesystem has a .zfs/snapshot directory - in there are sub-directories, each named after the snapshot name - cd into the snapshot name, the OS auto-mounts the snapshot, and off you go Btrfs should be similar? Don't know the specifics. How it works internally, is some of the magic and the beauty of Copy-on-Write filesystems. :) -- Freddie Cash fjwcash@xxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
