0

I am hoping to preserve the created time in my files at migration, and came across the patch files that will do the magic. I configured the paths on my Ubuntu machine. However it doesn’t recognise the -N when I tried rsync -aN <file> <output path>. Would be great if anyone points out what’s missing here.

I performed these steps in /usr/share/. to install the patches. I already had rsync installed on my ubuntu machine before.

sudo curl -O https://download.samba.org/pub/rsync/src/rsync-3.1.3.tar.gz
sudo curl -O https://download.samba.org/pub/rsync/src/rsync-patches-3.1.3.tar.gz
sudo tar -xvf rsync-3.1.3.tar.gz 
sudo tar -xvf rsync-patches-3.1.3.tar.gz

cd rsync-3.1.3

patch -p1 < patches/fileflags.diff
patch -p1 < patches/crtimes.diff
patch -p1 < patches/hfs-compression.diff

./configure
make

It looked like the configuration was successful despite seeing the rm: conftest.c: resource busy messages.

checking whether -c -o works... rm: conftest.c: Resource busy
rm: conftest.c: Resource busy
yes
checking for stunnel... stunnel
checking for stunnel4... stunnel
checking for _acl... rm: conftest.c: Resource busy
no
checking for __acl... rm: conftest.c: Resource busy
no
checking for _facl... rm: conftest.c: Resource busy
no
checking for __facl... rm: conftest.c: Resource busy
no
checking whether to support ACLs... Using OS X ACLs
checking whether to support extended attributes... Using OS X xattrs
configure.sh: creating ./config.status
config.status: creating Makefile
config.status: creating lib/dummy
config.status: creating zlib/dummy
config.status: creating popt/dummy
config.status: creating shconfig
config.status: creating config.h

    rsync 3.1.3 configuration successful

    Note that yodl2man was not found, so pre-existing manpage files will be
    used w/o change (if available) -- no .yo file changes will be used.

rm: conftest.c: Resource busy

I’ve also tried the following but didn't manage to apply the patch settings.

sudo systemctl start rsync
sudo systemctl enable rsync
5
  • The resource busy is really unusual. Are you building on an NTFS filesystem? – roaima Jul 17 '20 at 21:01
  • Where's your make install, and to what destination has it installed? – roaima Jul 17 '20 at 21:02
  • they are both installed to /usr/bin/ and the install files are kept in /usr/bin/share/. And yes, I'm building on an NTFS filesystem. I've also used exactly the same steps to install patches on my macbook. The installation was fine, I can run the -N command and haven't come across the resource busy issue. – byc Jul 19 '20 at 16:16
  • You probably need to run make install to install the binaries into /usr/bin. Or add the source tree bin to your $PATH – roaima Jul 19 '20 at 16:18
  • hm I ran make install after make but it still didn't recognise the -N – byc Jul 20 '20 at 8:46
0

One thing to note is IF your file system stores the created on stamp.

Run this to see if your files even have a birthdate stamp. My Ubuntu 18.04 is not setup with birthdate file stamps. (wrong filesystem format to support born on date)

Run this if you get a date it is doable. If you get a - then there is no born on date and rsync will not transfer it as it is not there.

stat -c '%w' fileName. 

Example

I get no stamp on this machine as noted by the - on last line.

$ stat -c '%w' foo/foo1.txt
-
3
  • you are right. I don't have birthdate stamps on my machine. How did you get round with this problem on your Ubuntu? – byc Jul 19 '20 at 16:24
  • You don't get around this w/o changing filesystems. If your filesystem doesn't support creation Date I don't think there is a work around. You could add a new volume and format with a FS that supports the creationDate and copy the files to that volume. Then the creation dates for those files would be the day you copied them over. I am pretty sure EXT4 and ZFS support create date. There are others too. After the initial copy the new files will have the new creation dates. – Mark Stewart Jul 20 '20 at 15:59
  • I'm using NTFS and it supports create date too. Though like you said the create date will be the day when I copied the files not the original ones. There may be a way to retrieve the dates...askubuntu.com/questions/918300/… – byc Jul 20 '20 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.