8

In Linux is there an equivalent for Windows shadow copies? I would like to use this for a small setup nothing big but it would be nice to have some type of functionality like shadow copies.

kasperd
  • 29,894
  • 16
  • 72
  • 122
redknight
  • 847
  • 3
  • 9
  • 13

5 Answers5

7

LVM snapshot(1,2) not full equivalent, but work fine. Also btrfs support snapshot.

alvosu
  • 8,357
  • 24
  • 22
3

You could look at R1Soft's free Hot Copy or commercial CDP solutions. The Hot Copy is a kernel module that allows you to take copy-on-write volume snapshots of mounted filesystems.

See their tips page: http://www.r1soft.com/tools/linux-hot-copy/hcp-tips/#c852

ewwhite
  • 194,921
  • 91
  • 434
  • 799
1

You could set up a mirror using LVM or md then break the mirror to get the snapshot, or use an overlay filesystem

symcbean
  • 19,931
  • 1
  • 29
  • 49
1

Another possibility could be to use rsnapshot. But LVM snapshot is probably the better solution if you have a large amount of data.

Raffael Luthiger
  • 2,011
  • 2
  • 17
  • 26
-2

LVM snapshots are NOT safe, since they are NOT independent.

If you create a snapshot, then write to the file in the origin, the file in snapshot will be modified.

I wouldn't recommend using BTRFS right now (as of this writing, it is still a rapidly developed product). But it is in a usable state, given the recent enough (4.2+ recent) kernel.

The mature alternative to both LVM and BTRFS is ZFS, and it has a number of advantages over BTRFS, i.e. recursive operations by default. I strongly recommend it, if you don't give a crap to licensing bullshit.

AnrDaemon
  • 131
  • 1
  • 6
  • 2
    This answer is wront: using LVM snapshot, writing to the original filesystem will *not* affect the snapshotted one. – shodanshok Oct 22 '16 at 11:32