Hot Copy (hcp) - Free Universal Disk Snapshot Utility for Linux Servers
The R1Soft Hot Copy utility creates an instant point-in-time volume snapshot of any block device while the system is running without interrupting applications. Works on almost any Linux block device. It is like Volume Shadow Copy for Linux.
Download Latest version
Take a Hot Copy of your disk before starting your tar or rsync backup. Backing up your Hot Copy will turn your tar backups into consistent point-in-time online backups.
# hcp /dev/sda3
# tar -cvzpflS /var/hotcopy/sda3
Need to run a script that deletes a bunch of files? Changes permissions all over the place? Take a Hot Copy first! Make a mistake...? No problem. You have an instant point-in-time backup!
# hcp --read-only /dev/sda3
# RUN DANGEROUS SCRIPT or COMMAND
Want to test that Perl script out before running it on your system? Want to run that strange shell script and worried it's an exploit? Run it inside of a Hot Copy!
# hcp --read-only /dev/sda3
# chroot /var/hotcopy/sda3
# RUN DANGEROUS SCRIPT or COMMAND
Want to know if your file system is corrupt without shutting down your server?
Make a Hot Copy of the device (yes even while the system is running). Now you have a consistent point-in-time snapshot you can run fsck on to see if you have problems. Now remember Hot Copies are lost when you reboot so you can’t use fsck to fix the errors. You can use it to detect errors without shutting down. This way you can know that when you reboot you will be stuck in fsck for hours and it won’t be a surprise
# hcp --skip-mount /dev/sda3
# fsck -a -y /dev/hcp1
Take a Hot Copy before making a change to your system. Then use the diff utility to tell you what files changed between your Hot Copy and the real device.
Let’s say you have your root file system (/) on device /dev/sda3
Now take a Hot Copy
# hcp /dev/sda3
Now make some changes
# ./run-some-installer.sh
See the differences
# diff --recursive / /var/hotcopy/sda3