I'd like rsnapshot to not create a second copy of all my files and instead just have hardlinks to the original files and only save a copy of changes.
I have a windows and linux server. I would like to have backups of my linux system stored onto the windows system. However I'd also like to have snapshots available for users.
I am running rsnapshot on linux in order to have snapshots. I cannot place the snapshot root on windows since I cannot preserve the file attributes on the different file system, therefore the snapshot resides on linux. This means now my files are using double the space (original and snapshot)
Since a snapshot is not a backup, I create a backup by zipping up my files and sending the zip file over to windows.
The issue is that since I am creating a separate backup, I have no need to keep two copies of the same file on linux. Therefore I'd like rsnapshot to not create a second copy of all my files and instead just have hardlinks to the original files.
Can I simply manually create the first retain/interval folder with all hardlinks? (cp -al)
The way rsnapshot works, on the first run, it creates a full copy.
On the next ones, it only stores the files that have changed. If a file hasn't changed, it creates a hard link to it.
Yes. You have the working files, and snapshots.
If what you want is for rsnapshot to not copy the whole tree on the first run, the issue is that since it's the same file, it can't detect the changes.
This is the basic logic.
If RFILE_A1 is a hardlink to FILE_A, the problem is that any change on FILE_A can't be detected since the underlying data is the same.
The simple explanation is, A Hardlink is a name. It points to data on the disc. So when you create an extra hardlink, you're reusing the disk data. So changes can't be detected.
Short answer (TL;DR), you can't. You need that first full copy.
Another option may be to use something like Git.