# Automate Ghost style backup.



## michaelrmgreen (Apr 5, 2013)

As one of a number of backup techniques, I use G4U to create a disk image from my main system. 

For those not familiar with G4U, it uses a Live NetBSD CD to boot and creates an image file using dd, which is sent by FTP to a system on the same network.

Today my CD drive died and it made me think "Is there a simpler, non-interactive, way to do this?"

So there you have it, can I create a disk image, which I could restore onto a blank disk, without all the rebooting and mucking about with CDs?


----------



## SirDice (Apr 5, 2013)

You could create a bootable FreeBSD USB stick. You could then use the same techniques (dd(1), ftp(1) etc.).


----------



## wblock@ (Apr 5, 2013)

Do you mean a "bare metal restore", where the backup media is bootable and restores itself?  If you have an always-on machine, it can easily be set up as a PXE boot server.  I use mfsBSD booted from my server for that.  Also Clonezilla, mainly for backing up Windows systems.


----------



## michaelrmgreen (Apr 6, 2013)

wblock@ said:
			
		

> Do you mean a "bare metal restore", where the backup media is bootable and restores itself?  If you have an always-on machine, it can easily be set up as a PXE boot server.  I use mfsBSD booted from my server for that.  Also Clonezilla, mainly for backing up Windows systems.



As usual, for me, my question was a bit vague. What I want is something that creates an image I can restore onto a blank disk, the restore method is unimportant, what I seek is an unattended backup method, so I don't have to remember to do it myself.


----------



## wblock@ (Apr 6, 2013)

A backup script triggered by cron(8) can do that.


----------



## kpa (Apr 6, 2013)

I wouldn't use dd() if you're thinking about using it. I would backup the partitioning with gpart(8) and then use dump(8) to create a backup that can be restored with restore(8).

All of the backup and restore functions could be automated with simple scripts.


----------

