2

I have some programs that allow exporting to different formats (e.g. html), but many of them share a problem: Exports are always done "all together", i.e. things like images or attachments are created new in the export folder on every export, even if they have not changed since last exporting. Also, usually they don't take care of removing deprecated files or may even fail when the directory already contains files. I've seen similiar problems with the export functionalities of different programs, currently my use-case is ZIM Desktop Wiki.

I thought I could just export to a temporary directory and then use rsync to synchronize the exported file to the final export directory, e.g. Google Drive or Dropbox. Using rsync however, I couldn't find a way to integrate the changed files into the target directory without changing the modification times of files that did NOT actually change, which is likely to confuse either backups of the directory and/or the cloud synchronization, causing unnecessary upload traffic in one case, duplicate files on the drive with the incremental backups in the other and a huge waste of time in both.

Is there some way to make rsync do a check by actual file contents and leave meta-data alone for files that are the same, or some existing solution other than rsync?

1 Answer 1

1

From the rsync man page:

-c, --checksum : skip based on checksum, not mod-time & size

1
  • Doesn't preserve the modtime of unchanged files, so it is still likely to confuse other software.
    – kdb
    Aug 5, 2013 at 11:53

You must log in to answer this question.

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