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
    Commented Dec 1, 2020 at 0:43
  • @Izzy rsync sounds good. Do you know the command line to achieve what I want? Commented Dec 1, 2020 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
    Commented Dec 2, 2020 at 2:17

2 Answers 2

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. Commented Dec 2, 2020 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. Commented Dec 2, 2020 at 13:55
0

Total Commander contains a powerful directory synchronization tool. It is a good solution for Windows if you only need to synchronize once and control the process manually. After comparing, you can select groups of files and apply the rules you need one by one.

enter image description here

Let's assume that the originals are on the left and the backups are on the right.

  1. Display only files that exist on the left and Synchronize
  2. Display only files that exist on the right. Right-click button and choose "Delete right".
  3. Display only different files. Select all files for copying from the left to the right or select them manually (Not exactly your request but similar)
New contributor
vovan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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