Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Preserve file metadata when exporting #677

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tooa
Copy link

@Tooa Tooa commented Jun 13, 2020

  • Use copy2 instead of copy when exporting documents. This preserves documents metadata

  • Useful when the export dir is used to rsync files to a remote host for offsite backups. The function copy2 makes sure the modification date does not change when exporting on a regular basis. Otherwise, rsync copies all files to the target even if they already exist on the remote. One can work around this behavior with --ignore-existing, but I think copying metadata for backups with the export functionality is important.

Shell we do this for import_documents too?

Copy link
Contributor

@MasterofJOKers MasterofJOKers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a good idea, even though probably more expensive on slow devices, because of the additional lookups and writes.

I'm in favor of doing this for the importer, too, even though the only use-case would be re-exporting again, I guess.

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

Successfully merging this pull request may close these issues.

None yet

2 participants