Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/rsync --crtimes, -N: preserve creation/birth time is not supported #166

Closed
ghost opened this issue Mar 17, 2021 · 5 comments
Closed

Comments

@ghost
Copy link

ghost commented Mar 17, 2021

@WayneD

Based on this report in FreeBSD Bugzilla.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254354

Here you can see that FreeBSD generally supports crtime/btime see the stat command.

stat -f "Access (atime): %Sa%nModify (mtime): %Sm%nChange (ctime): %Sc%nBirth (crtime/btime): %SB" /video.mkv

Access (atime): Nov 22 16:07:46 2018
Modify (mtime): Nov 22 16:07:46 2018
Change (ctime): Nov 22 16:07:46 2018
Birth (crtime/btime): Nov 01 01:19:02 2016

If the user uses rsync (3.2.3) to preserve the crtimes with --crtimes or -N for directories and files, it does not work. It says in the terminal that it is not supported.

I can also reproduce this problem on other BSD systems, such as OpenBSD (6.8) and NetBSD (9.1).

It is generally known that all BSD family and other Unix systems have supported Birth time (btime) for files + directories for ages.

This means that a patch in rsync should add that it generally fixes this problem. So that all BSD systems and other Unix systems can use it immediately.

@WayneD
Copy link
Member

WayneD commented Apr 4, 2021

BSD doesn't have support for setting the birth value to an arbitrary value on an existing file, so it's not supported in rsync.

@WayneD WayneD closed this as completed Apr 4, 2021
@jtommi
Copy link

jtommi commented Apr 4, 2021

@WayneD I get the same on Debian and Fedora, rsync 3.2.3

@Yetoo1
Copy link

Yetoo1 commented Apr 9, 2021

@WayneD Please reopen this, I also experience this issue with rsync 3.2.3 on Debian and Fedora. It looks like someone made a patch for this a while ago https://github.com/Homebrew/formula-patches/blob/master/rsync/patch-crtimes.diff in case anybody is looking for it (Source: https://forums.gentoo.org/viewtopic-t-1132995.html?sid=76442243e17d281bfb58008fbb8746db).

@RsyncProject RsyncProject deleted a comment from WayneMDB May 1, 2021
@WayneD
Copy link
Member

WayneD commented May 1, 2021

This issue is about crtimes on FreeBSD, which doesn't have full crtimes support (it only sets crtime at file creation and when the mtime moves prior to the creation time). The patch you cited is for OS X, which rsync already supports just fine without any patches. Linux doesn't support crtimes in general, but if someone has a portable extension patch feel free to submit it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants