Thursday, May 15, 2008

Solaris one liner backup

--> move a directory to another server
tar cf - ./games rsh brucey cd /tmp\; tar xvBpf -
--> move a directory
tar cf - ./games (cd /tmp; tar xvBpf - )
--> dump to zip
ufsdump 0f - /filesystem /opt/local/gzip - > /tmp/dump.gz
--> backup one liner
tar cvf - /home/ebs gzip - > ebs.tar.gz
--> encrypt filename 1 and output to 1.crypt file
crypt <> 1.crypt ; rm 1
--> decrypt filename 1.crypt and stdout to screen
crypt <>
--> clever way to archive
tar cvf - `find . –print` >/tmp/dumpfile.tar
tar xvf - selectively extract from a tar archive
tar xvf /tmp/iona.tar ./iona/.sh_history