Question: I have a ?question about a FreeBSD server that I cannot access at the moment. But because we would like to try some new stuff we want to create a backup of this system first.

The question is: is there any possibility to create a disk image over ssh from the whole server disk that is currently a live system?

If there is: I would like to know how to do this.

Answer: It’s not really possible under Linux. The reason it is under Windows is Volume Shadow Copy.

If your system uses LVM you can take a snapshot and then rsync that over for an atomic copy of the files, you would need to restore partitions/boot loader however.

Easiest method if it must be done, is use dd to copy it:

dd if=/dev/sda | ssh user@remotehost ‘dd of=/path/to/output’

And then in order to make 100% sure your files are ok, rsync from the running one on to the drive you dd’d the image to once you’ve mounted it. (I’ve skipped rsyncing the differences hundreds of times with no ill effects, but that is only on heavily read based server access)