X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=t/Bvsj0oQCT6VIpu0MVNG9zzZRdZe AHnZQA91GSY1xFcoJn+z2+vPzENx5f1OkNQ4s/NPTa43iG1lKf6cVtu9Ekiugspb +BGebTLgfaOZLbEsLAH4oeO92hRe/lsONwpee8FX2duYfiAHjzR7DDcIuG5c98vc r+69f/9KnIjC0Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:mime-version :content-type; s=default; bh=aVnL5Qgid3MaeZt8b4oizj5b13E=; b=yl/ 8txzwerLcW+Na3A1dw1T4Oylo1sJpTknPbsOzQhYUsV+EKcqCOANibw/SRomSydd gEtGEH2OYs9CuMBl9kpe/Q0qVlo0ujAY2jcmCa6ZwCfyiccyLE3MuUTXZtRDDp91 VrneUfXENK6ik1Myfoyr04ltHrmyWk24PYwsWriI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 To: cygwin AT cygwin DOT com From: Oleksandr Gavenko Subject: Recursively recreate hierarchy with NTFS hardlinks by Cygwin Date: Wed, 02 Aug 2017 14:33:03 +0300 Lines: 57 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 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