Network Backup


p>Sparkus, my SparcStation 5, camed with a nice 4mm DAT tape drive, so I do had a real life use for it. Network backup of my machines!!. 🙂

Instead of using backup software like the excellent Amanda, once again I decided to go my way, to address my extremely simple backup needs.

I decided to backup two workstations, darkstar (linux) and dany (win), from darkstar to Sparkus . So I shared the diretories I want to backup from dany and mounted them on darkstar with samba. Then it was simple a matter of writing a couple of scripts to remote backup directories over the network.

Since Sparkus is a Solaris 8 box, I use the following scripts from darkstar.

To backup dany I use:

# Remote backup
tar zcvf - /mnt/Disco_Dany --exclude RECYCLED | rsh -l pablot sparkus dd of=/dev/rmt/0 obs=20b

So I tell tar to backup what’s mounted on /mn/Disco_Dany from dany and send it to the standard output; it also compresses it on the fly. I could have used a compression aware device on Solaris, but I think this way I get a better compression ratio, and also I do not have to use procesing power from Sparkus, that will probably slow down the backup.

I excluded the RECYCLED directory because that’s only trash, and piped it trough rsh to dd on sparkus to finally send it to the real tape.

I also have a similar script to backup darkstar. The only change is in the source directory.

In order to restore or view the backups, I have to do the opposite. So here are the two scripts to restore and view the backup.


# Remote restore
rsh -l pablot sparkus dd if=/dev/rmt/0 bs=20b | tar zxvf -


# Remote view
rsh -l pablot sparkus dd if=/dev/rmt/0 bs=20b | tar ztvf -

I just had to execute dd on Sparkus trough rsh and pipe the result to a local tar taking it’s input from the standard in.

Una respuesta a “Network Backup

Add yours

Deja un comentario

Subir ↑