This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Recursively recreate hierarchy with NTFS hardlinks by Cygwin
- From: Oleksandr Gavenko <gavenkoa at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 02 Aug 2017 14:33:03 +0300
- Subject: Recursively recreate hierarchy with NTFS hardlinks by Cygwin
- Authentication-results: sourceware.org; auth=none
I am going to write backup solution for my personal laptop.
I have 240GB SSD for development work and 500GB HDD for media files and
backups.
I am care only about project files and don't care about windows files or
program installation (as registry also should be preserved for backup to be
useful).
On Linux I uses:
cp -al /backup/proj/DATEOLD /backup/proj/DATENEW
rsync ... /home/user/proj/ /backup/proj/DATENEW/
and employ hardlinks to preserve space.
NTFS FS has hardlinks. With ``cygutils-extra`` I can:
$ winln $FROM $TO
$ echo >>$FROM
$ cmp $FROM $TO && echo OK
But I don't understand how to emulate recursive behavior of ``cp -r -l``.
Cygwin ``cp -l`` can use hard links but only with:
CYGWIN=winsymlinks:native
``rsync --hard-links`` isn't reliable:
bash# echo 1 >orig.txt
bash# rsync -a --hard-links orig.txt new.txt
bash# echo 2 >>orig.txt
bash# diff -u orig.txt new.txt
--- orig.txt 2017-08-02 14:04:36.976875300 +0300
+++ new.txt 2017-08-02 14:04:16.547209000 +0300
@@ -1,2 +1 @@
1
-2
There is Windows build-in ``robocopy`` utility but its documentation looks too
complex, I don't like to mix Cygwin and Windows paths and looks like it
doesn't support hard link from "Robocopy.exe /? | grep -i hard".
As development of rdiff-backup stalled in 2009 I don't believe that it
supports hard links in native Windows build.
As a bonus I am also interested to hear about solution with include data
integrity checks to detect data altering or rotting of storage bits in backup.
I think about employing md5sum utility...
--
http://defun.work/
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple