From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72190 invoked by alias); 2 Aug 2017 11:33:29 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 69673 invoked by uid 89); 2 Aug 2017 11:33:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KAM_OTHER_BAD_TLD autolearn=ham version=3.3.2 spammy=backup, H*r:Unknown, hdd, HDD X-HELO: blaine.gmane.org Received: from Unknown (HELO blaine.gmane.org) (195.159.176.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Aug 2017 11:33:23 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dcrtl-00054U-36 for cygwin@cygwin.com; Wed, 02 Aug 2017 13:33:09 +0200 To: cygwin@cygwin.com From: Oleksandr Gavenko Subject: Recursively recreate hierarchy with NTFS hardlinks by Cygwin Date: Wed, 02 Aug 2017 11:33:00 -0000 Message-ID: <86efsu19xs.fsf@gavenkoa.example.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (windows-nt) X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00027.txt.bz2 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