Is it possible (in classical ext4, and/or in any other filesystem) to create two files that point to the same content, such that if one file is modified, the content is duplicated and the two files become different? It would be very practical to save space on my hard drive.
Context: I have some heavy videos that I share on an owncloud server that can be modified by lot's of people and therefore it may be possible that some people modify/remove these files... I really would like to make sure I have a backup of these files, and therefore I need for now to maintain two directories, the normal nextcloud one, and one "backup" directory, which (at least) double the size required to store it.
I was thinking to great a git repo on top of the nextcloud directory, and it make the backup process much easier when new videos are added (just
git add .), but
git still double the space, between the blob and the working directory.
Ideally, a solution that can be combined with git would be awesome (i.e. that allows me to create a history of the video changes, with commits, checkouts... without doubling the disk space.
Moreover, I'm curious to have solution for various file systems (especially if you have tricks for filesystems that do not implement snapshots ). Note that LVM snapshot is not really a solution as I don't want to backup my full volume, only some specific files/folders.