On Wed, Aug 26, 2015 at 9:31 PM, james harvey <jamespharvey20@xxxxxxxxx> wrote: > I'm using btrfs and snapper. So, I have many periodic btrfs > snapshots, which are marked read-only (can of course be changed by > btrfs to r/w and changed back.) > > Let's say during my initial install I set a vimrc. And, let's say now > I want to change the vimrc, so that if I go back to any of the > snapshots my vimrc is the new one. Yeah, this totally re-writes > history, and goes against the idea of having historical backups. But > let's say that I change active snapshots often for testing and don't > want to keep having to re-change certain configuration files like > this. And I'm OK with blowing away my backups of the file. > > Right now, there should be only one copy of the vimrc file contents > that are being used/pointed to, since it's never been modified since > the very first snapshot. > > Is there a way I can modify the vimrc file, so that "all of them" are updated? a. Find the shared extents with btrfs-debug-tree or filefrag and modify the bytes outside the filesystem (unmounted). Of course the csum will be wrong so you'll need to use btrfs check --init-csum-tree on the entire filesystem. b. Next time use a symlink to a location that's always mounted where the real file is kept; so the snapshots have the symlink not the real file. -- Chris Murphy -- 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
