1

Do you know any Linux app which is able to copy mounted/used file? Similar behaviour to rebuilding RAID1 array - you can use master drive, while the second is rebuilding/mirroring content from the master drive.

I have 500GB file which is mounted and I would like to copy it without unmounting...

Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151
herdom
  • 13
  • 2

2 Answers2

0

I understand that snapshot is not sufficient for you, because you need to have a copy from a recent point in time.

The industry name for the functionality that you require is Continuous Data Protection (CDP). Hope that it helps. This is relatively new technology for me, and I cannot really recommend any solution that "just works" for any arbitrary file on Linux.

kubanczyk
  • 13,812
  • 5
  • 41
  • 55
-1

A simple

dd if=/dev/sdb1 of=/home/backup/disk.bak

should do the trick.

For mounted (device) files, you should definitely do a sync before you start the copy. Once dd runs, there is no guarantee that changes made to the filesystem are in the backup.

Before you start using the backup file, you should run fsck on the file

Undo
  • 311
  • 6
  • 19
fholzer
  • 529
  • 1
  • 3
  • 9
  • Thank you for answer, but as you mentioned, using dd doesn't guarantee consistent copy. Somehow RAID1 rebuilding mechanism does the trick, and I am looking for something similar. – herdom Nov 07 '10 at 12:40
  • ok, are you talking about an already running system, or a system you are planning? because if you are just planning it you could use lvm and snapshots – fholzer Nov 07 '10 at 13:25