0

TL:DR: I have a Synology NAS with a huge set of source files and a second (target) NAS with a duplicate of these files (plus a few days work). I would like to copy the Creation Timestamp from the source files to the target files.

Long story:

My work recently had a hard drive fail within one of our Synology NASs. Working off of a backup, I decided to update our backup strategy, which involved a new NAS and new drives. I set up our backup NAS to use Synology's Folder Sync functionality to create my duplicate files on the new NAS. It worked great except for one thing.

The files on the new NAS took their modification timestamps from the source files just fine, but the creation timestamp was set to the day that I did my backup for every single file. Some of my coworkers use the file creation timestamp for their work, so I"m trying to get the correct timestamps back.

In the past, I've updated modification timestamps by writing a PHP page that simply looked through both file trees for matching filenames, overwriting modification timestamps as it went, but I can't figure out how to do this with creation timestamps, or even if it's possible. Also, the modification timestamps on the target files are all correct. There are tens of thousands of files on the drives, so updating one by one is not possible. What are my options? Is it possible?

Edit: Since people have asked, my NAS is reporting the filesystem to be "Btrfs". It has 4 drives in it set up in RAID 10.

3
  • I use NirSoft's Bulk File Changer for similar, although smaller, tasks. It can be run as a standalone program and allows bulk changes to created, modified, and accessed time stamps, in addition to file attributes. NirSoft EDIT: I'll leave the comment, but just realized your needs are more than this tool offers.
    – user704708
    Commented Mar 17, 2017 at 19:17
  • 1
    What filesystem are you using on the NAS (ext4, ntfs,...), and how are you exposing them on the network (nfs, cifs,...)?
    – meuh
    Commented Mar 17, 2017 at 20:05
  • According to the Storage Manager within my system, the filesystem is "Btrfs".
    – AaronK
    Commented Mar 20, 2017 at 13:04

1 Answer 1

0

You didn't specify what operating system or filesystem you are using. There is some useful information here: https://apple.stackexchange.com/questions/199536/how-to-keep-original-date-created-when-copying-via-terminal

That's an apple-specific question, but the answers and comments provide some general information that you might find useful. In particular: "If you want to copy files to another file system then you need to compile rsync with the patches fileflags, crtimes, ..."

So, assuming that you are working on a system that supports rsync (e.g. Linux) then that might be your answer.

Good luck.

Duncan

1
  • The drives are set up using the "Btrfs" filesystem, and it does support rsync. The data is also accessible from any computer on the network so I could make changes from either windows or mac. Unfortunately, your link is how to keep the creation timestamp when copying, but I've already copied the files and now need to update them. :\
    – AaronK
    Commented Mar 20, 2017 at 13:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .