Debian – Backup root partition with dd without downtime

backupdddebian

Is there a way to remount / as read-only and buffer new writes in RAM, so can backup the / media with dd?

I want to create a bootable image from my SoHo-Server (Debian 6) without a live cd or any downtimes. The only tool I know that can do this is dd but I would need to lock the root patition to keep the filesystem consistant. It's just a 16GB USB drive, so it wouldn't take too long and RAM is large enough .

Or is there an other approch to do this?

As far as i know rsync is not able of keeping consistancy like ShadowVolumes on Windows could.

Best Answer

You can use the free Idera R1Soft Hot Copy utility to accomplish this.

This is a utility that installs as a kernel module and allow you to take a copy-on-write snapshot of a running system. You can install it and run on-the-fly without a reboot.

The result is that you can create an on-demand read-write or read-only snapshot of any of your mounted filesystems. They'll show up in a path similar to /var/hotcopy/[device_name]_hcp1/ by default, but the mountpoint is also configurable... (I use /backup)

I actually use Hot Copy to augment the regular tape backups on my standalone Linux servers. It removes file-contention issues and gives a more accurate backup.

When done, you destroy the snapshot and continue as normal.

This component is a the core of the commercial R1Soft CDP backup software suite, but is an extremely handy way to obtain Linux system snapshots without LVM, ZFS or Btrfs.

Related Topic