1

I have set up a backup of some working folders of a server (running with Centos 7) to a remote disk using lsyncd.

It's great, however I'm quite undecided about what to do about file deletion:

  • If I disable file deletion (files deleted on the source will remain on destination, with the "delete = false" option) I am sure that I will loose nothing but my working directories are quickly becoming very messy to say the least.

  • If I enable file deletion (default value of lsyncd, or "delete = true") my destination folder will be in sync with my source but I am afraid that me or rather some other users of the server will delete some of their files by mistake for some reason, have these deletions synchronized to destination and loose important stuff.

Right now I have chosen the first (delete = false) option because I'm afraid of people deleting stuff by mistake (some working directories are shared which increases this risk). But is this really something that happens in real life (I have read stories but it seems fairly anecdotal) in your experience ?

Is there a way to mitigate the risk of misdeletion ? Intermediate options of lsyncd (delete = running or delete = startup) don't seem particularly helpful in my case but I may be wrong.

DylanM
  • 113
  • 3
  • 1
    The name gives it away. Lsyncd is a sync solution, not a backup solution. One way to fix this is to use it to sync to your destination and then regularily snapshot the destination, but I'd advise using an specialized backup tool. – UrOni May 17 '19 at 16:52
  • I see, it makes sense, thanks for the advice. – DylanM May 20 '19 at 08:03
  • 1
    Well, some people abuse lsyncd for two-way synchronization, like me, so you might want to make sure that no data is lost for some unknown reason. Especially if the backup only runs once in 24 hours. I just noticed that you could build a place with delete = true AND a place with delete = false. Hmm, let me try that. – uav Jul 30 '20 at 15:40
  • As a conclusion, I ended up switching to a more backup-dedicated tool (duplicity with duply as wrapper) which is more convenient way handling user doing weird stuff. – DylanM Aug 02 '20 at 17:52

0 Answers0