In the never ending saga of comparing disk vs. tape backup technologies there is clearly space for both. And not to turn this into a rant on why one is better then the other (with an everseeming conclusion that the right answer is always: "it depends"), I figured I'd just blog a self-serving response to a long outstanding request I've made to the customer (I'm supporting) for getting my lab machine backed up to tape while I am doing some development work for them.
I am currently working on a project involving definition of a Solaris 10 core image, based on the Solaris' jumpstart framework. This requires a respectable size of file systems to work with in terms of customizing the jumpstart environment. One of the things that I've requested is for a backup agent to be attached to this host in the lab, so that these file systems would be backed up on a nightly basis.
In the meantime, since there's plenty of spare disk that's already available on this machine, I challenged myself with writing a shell alias to do a backup routine on a daily basis. (A shell script just didn't seem that challenging anymore). So here I was, trying to see how much shell-execution I can really fit inside of an alias. Took some testing and at the end here is what I came up with. (I use tcsh as my shell and put this one-liner in my .cshrc file)
alias backup 'cd /export/gsjumpstart; mkdir /backups/export/gsjumpstart_`date | cut -b5-10 | sed 's/\\ /_/'`; find . -print | cpio -pmdv /backups/export/gsjumpstart_`date | cut -b5-10 | sed 's/\\ /_/'`'
(No big deal, really.)
This allows me to ensure that a new backup image consisting of the same file system and directory structure is created (whenever I kick off 'backup') and is dumped into its own directory marked with a date. You can easily expand it to cover time of day as well.
'till next time.
Posted by fdasfdsa on October 12, 2006 at 09:17 AM EDT #