4 ms·
Basically copying files without actually copying them. For example, when making versioned backups, or when copying a large number of files from production to va
by amelius 9y ago
Basically copying files without actually copying them. For example, when making versioned backups, or when copying a large number of files from production to various development environments.
Something I wish there was a better solution for. Perhaps there is a filesystem out there that supports CoW in a way that fits this usecase (XFS perhaps even), but I haven't looked into it.
The disadvantage of using hardlinks is that you can't hardlink between users (user is a property of the file, not of the link to the file), and there's always the danger that a write takes place through one of the links. Imho, that should really be solved at the filesystem level using a CoW scheme.
- koenigdavidmj 9y agoDoes btrfs, with cp --reflink, not meet your use case?
- e12e 9y ago> Perhaps there is a filesystem out there that supports CoW in a way that fits this usecase I'd recommend zfs snapshots - or for something a bit different, maybe nilfs2: http://www.linux-mag.com/id/7345/ http://www.linux-mag.com/id/7345/
- josteink 9y ago> Basically copying files without actually copying them. For example, when making versioned backups, or when copying a large number of files from production to various development environments. To me it sounds like you want simple snapshots and backups without the redundancy at the storage level. So why don't use a filesystem which supports that natively, like ZFS or Btrfs?
- mkj 9y agoDo they handle 64k snapshots?
- lloeki 9y agoThat's one backup every hour for 7+ years. I'm really curious about the use case. Anyway, theoretically[0]: > As you might know btrfs treats subvolumes as filesystems and hence the number of snapshots is indeed limited: namely by the size of files. According to the btrfs wiki the maximum filesize that can be reached is 2^64 byte == 16 EiB But it seems practically you're hitting the mud at ~100 snapshots[1] but be sure to read the reply to that mail as it will depend on the use case and it might turn out to be fine way beyond that. [0]: https://unix.stackexchange.com/questions/140360/practical-limit-on-the-number-of-btrfs-snapshots#147666 https://unix.stackexchange.com/questions/140360/practical-li... [1]: https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg72385.html https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg...
- KaiserPro 9y agoNot sure, I have ZFS as a docker storage backend, its yet to crash* *not the best data point I realise....
- nialv7 9y agoFor versioned backup you should use reflink rather than hardlink. Hardlink is not CoW. Modify the file all your backup will change too.