#large filesystem copy preserving time of creation

31 messages · Page 1 of 1 (latest)

grizzled light
#

hi! i'm on vanilla arch linux. i'm currently pretty new to linux so i'm quite unfamiliar with the quirks of day-to-day operation - so i'm currently in the process of moving backed up files off of an external exfat hdd to my local btrfs drives. i used rsync -rtP external/folder /folder to transfer the files in two of my four drives, but i noticed that rsync only preserves modification date, not creation date. i've read online that cp or touch can maintain that creation time metadata...

what should i do to 1. maintain the creation and modification time metadata in the 2 remaining drives i need to copy?
and 2. update the already-copied existing files on my drive with the correct metadata from the external drive's versions of the files? is there a command that can run touch to iterate on each filename and update them one by one? or is cp the more efficient command for copying files between my external and my local filesystem and i messed up from the beginning by using rsync, and copying both creation and modification time is possible?

thank you so much for your help!

sharp pulsar
#

On exFAT, there actually isn’t a true Unix-style creation/birth time (btime) that Linux can reliably preserve and copy to another filesystem in the same way macOS/Windows tools might.

Try rsync -aHAX --info=progress2 /external/folder/ /folder/

#

Or using cp like this cp -a /external/folder/. /folder/

grizzled light
#

ahhh i see 🥹 let me give it a shot later tonight!!

grizzled light
#

modification date has been preserved across all my copy operations so far, which is good at least, but it's unfortunate to lose the birth time like this :(

sharp pulsar
grizzled light
#

i had the original ntfs versions of these files, then used teracopy on windows to copy them to my exfat external

#

to temporarily hold them while i reformatted my internal drives to btrfs

#

the metadata is preserved when i examine the files on my external, so i thought there was no issue

#

stackexchange tells me that there is no real way to arbitrarily assign creation time on linux, though...

#

or was i doomed from the start choosing to format the external to exfat, is what you mean?

sharp pulsar
sharp pulsar
grizzled light
#

ahh i see...

#

darn. thats such a bummer

#

i chose exfat because it was one of the only filetypes accessible on windows that would present the fewest problems when moving the data over to linux

#

i fear the true original files are gone now.... i knew i shouldn't have but i wiped my other internal drives before checking that the copies would transfer onto linux fully intact

sharp pulsar
sharp pulsar
grizzled light
#

i heard that it was a lot riskier to transfer files from NTFS to a btrfs environment just because ntfs is proprietary, at least exfat was more likely to be compatible and open

#

that's okay - i can live with the modification dates, it's just a bummer since a lot of these files have been with me for a very long time and i hold stupid sentimental value over them LOL but i guess its not the timestamp that matters, its the content of the file

sharp pulsar
grizzled light
#

i figure that the creation times might move and shift around anyway if i was moving files between drives or the like

sharp pulsar
grizzled light
#

ahhh, gotcha

#

mm, in any case, not much i can do haha

sharp pulsar
sharp pulsar