Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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...

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer

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

share|improve this answer
    
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 7 '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 –  tkSimon Nov 7 '10 at 13:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.