0

I have a directory with 1000 something video files that are backed up on an external drive. The content of a video file doesn't change.

So I need a syncing tool that follows the following rule.

  1. If a file doesn't exist in backup, create it.

  2. If a file exist in backup, but not original, delete it, or ideally ask me what to do.

  3. If a file exists in both original and backup, check if the file name and size are the same, if yes, ignore it. If not, overwrite it or ideally ask me. Bonus if it also checks the first KB of the backup file to ensure it's not truncated by zeroes.

3
  • What OS should this run on (and what is your price limit)? First thing coming to mind is rsync, most easy available on Linux systems. Fits 1 100%, the first half of 2 is easy (--delete parameter), and the first half of 3 as well.
    – Izzy
    Dec 1 '20 at 0:43
  • @Izzy rsync sounds good. Do you know the command line to achieve what I want? Dec 1 '20 at 17:29
  • Not entirely. As it should be locally, something like rsync --delete -Pa <src> <target> ("P" stands for "show progress", which is good for testing; "a" is a combination of flags meaning "archive", i.e. keep all attributes, time stamps etc). Depending on your structure, "src" should end with a / (meaning, all inside it) but target not – that might require some playing with, hard to describe. In the worst case, it copies the source directory inside target. Always fist try with something you can afford to loose, until you get a feeling for it ;)
    – Izzy
    Dec 2 '20 at 2:17
0

For me it sounds like FreeSync could do the job, but I stumbled over the requirement to check for filename equality. How should the tool recognize that two videos are the same if not by filename, does it mean that the tool should compare the binary content?

2
  • It should compare both file name + file size. No need to compare the whole content. Dec 2 '20 at 13:11
  • @dranonymous - So this is what FreeSync does, it can compare two directories, if the relative path/filename matches, it can check if the filedate is different, and only copies the different files. This is how I make my backups it's super fast. I think you should try it, FreeFileSync is free. Dec 2 '20 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.