There is a way to make backups like you say, but I don't believe with Robocopy alone.
There are several programs that will hard link or dedupe backups, and be space efficient.
Here are a few programs I've used or ran across:
- Dupemerge - free - While not a "backup program" it is a bulk hard linker.
- hardlink backup - free for personal use - uses hard links
- Duplicati - free - (dedupes I believe like rsync does)
- rdiff-backup - free - dedupes like rsync
I believe what may be a good fit for your questions is Dupemerge. You could have a batch file execute Robocopy to copy the contents to a directory (ex. d:\backups\YYYY-MM-DD). When that command is done, the batch file could call Dupemerge on d:\backups. That would hard link the files within and across all the subdirectories of d:\backups.
The downside of this is you would need enough space on the external to hold the newly created unhard linked backup. After Dupemerge is run, the newly created backup will be hard linked and the space will be freed.
This would make restoring easy because each dated directory would appear to have a full backup.
As a side note, if you are going to use hard links, I like Link Shell Extension. It helps let you know what isn't hard linked, what is and what it is linked to.
I’ve run across other hard link or deduping programs, but I liked these the best.
Best Answer
I know of 4 command-line solutions for linux. My preferred one is the last one listed here,
rdfind
, because of all the options available.fdupes
Sample output (with options "show size", "recursive"):
hardlink
--dry-run
option.Sample output (note how my two files have slightly different modified times, so in the second run I tell it to ignore that):
duff
Sample output (with option "recursive"):
rdfind
find
?).Sample output: