1

I'm currently setting up a synchronization task in Unison that should help me transfer data needed for working on the road from the desktop computer (location A) to my laptop (location B). For some of the data (in a specific directory) I would like this to be a "one way" transfer only, i.e.: the files should be stored in location A and not deleted during synchronization (so, this will probably utilize the -force and the -nodeletionpartial options).

The problem is that I would like to delete files from location B, after they have been worked on, and would like to keep them deleted during the next sync run. So, I guess, Unison will somehow need to "remember" that the files were there before, and only copy new files to location B.

Is that possible?

Marcus C.
  • 219
  • 1
  • 3
  • 11

1 Answers1

1

The best solution would be to use a different tool. Unison is for synchronization, and what your describing for those specific files sounds like you're just moving them from B to A after working on them on B. I would write a tiny script that uses something like scp or rsync or sftp to move the files from B to A and then deletes the files on B. You can run that script whenever you're done working on B (and you can evoke Unison from the same script too to sync the rest of the files), or if you want to automate this script you can set up a cron job.

Mike Pierce
  • 1,390
  • 1
  • 12
  • 35
  • Thanks for your reply and the suggestion. This sounds like a viable idea. The problem is that the files are never actually *moved* from `B` to `A`: They are stored in a kind of archive in location `A` and only a few of the files will be copied to `B`: They are necessary for working on the road and will simply be deleted, as soon as they are no longer needed. The problem is that next time, when the archives are sync'ed, the software will think that they need to be copied to `B` again, as they are missing now: This is what I would like to prevent. Any idea? – Marcus C. Aug 12 '19 at 08:13