1

I am looking to implement NILFS at my SME but I need a bit of help. I must backup the current system and all snapshots/checkpoints in a different continent to keep auditors happy. I'm currently using a home brewed system (Subversion based) and I can simply rsync that to another computer on another continent. However - how can I remotely backup a NILFS filesystem? Is there a NILFS utility for it or is there a linux block copy version of rsync I can use?

Thanks, in advance, for your help.

Cheers,

Neil

Neil Benn
  • 113
  • 3

1 Answers1

1

There isn't any utility to copy snapshots across continents, and rsync definitely won't work. I see two possible options here:

  • use DRBD. Create a DRBD cluster between your two sites. Protocol A allows you to keep a good enough performance across large WAN and limited bandwidth. The source NILFS filesystem will be entirely replicated over the destination, with checkpoints and snapshots and everything.

  • use ZFS snapshot replication. This is different from NILFS, but you can get as fast as taking a snapshot every 15 or 30s if needed. However you won't have (as NILFS provides) a complete checkpoint for each and every file created and modified.

[edit] As apparently you need complete and continuous replication, DRBD+NILFS2 seems the best solution. The one limitation that you'll have is, as you're doing block level synchronisation, of course you can only use the filesystem at one end at the time (basically on the "master" side).

When (and if) you need to access the filesystem both on the "master" and the "remote" side, you should do something like this:

On the master, run:

sync

Immediately after, on the slave, run:

drbd disconnect all
# check that you're offline...
drbd primary all

You can then mount the volume on the slave side (while it's still in use on the master side). The replication, of course, is suspended while you're accessing the volume on both sides.

When you're done, simply reconnect the ordinary way: on the slave run

drbd secondary all
drbd --discard-my-data connect all

on the master run

drbd connect all

And after a short while you should be back in sync.

wazoox
  • 6,782
  • 4
  • 30
  • 62
  • 1
    Thanks; I think the first option is my only choice. I was hoping for a utility or to do a blockwise transfer. My requirements are a total history trail and a cross-continental backup. The auditors have no computing knowledge and if I used Microsoft Sharepoint then they just tick a box but I'm loathe to bring that beast into the organisation! – Neil Benn Jan 18 '18 at 17:25
  • I was hoping for a blockwise equivalent of rsync I could run overnight but I guess that isn't there. – Neil Benn Jan 18 '18 at 17:27
  • 1
    Really DRBD is pretty close to "rsync for blocks" particularly if you're using protocol A, @NeilBenn . You can go as far as run it only at night if you need too, and you can finely tune bandwidth usage. That seems a pretty decent solution to me. I'll add a couple of ideas in the answer. – wazoox Jan 18 '18 at 17:48