Re: Write one file to a DVD=CDW

From: Bill Verzal (BVerzal_at_KOMATSUNA.COM)
Date: 12/16/03

  • Next message: Patrick B. O'Brien: "Re: Write one file to a DVD=CDW"
    Date:         Tue, 16 Dec 2003 13:08:38 -0600
    To: aix-l@Princeton.EDU
    
    

    #!/usr/bin/ksh
    #

    YmdHMS=`date +%Y%m%d-%H%M%S`
    log="/var/mksysb.$YmdHMS"

    exec 1>$log 2>&1

    echo '====================================================='
    date
    echo '====================================================='
    echo " "

    umount /cdrom 1>/dev/null 2>&1
    rm /usr/cd.iso/bk.tar 2>/dev/null
    rm /usr/cd.iso/bk.tar.Z 2>/dev/null
    rm /usr/cd.iso/backup.iso 2>/dev/null
    files='/root /usr/local/bin /home/operator /etc'

    echo "Backup created $YmdHMS" > /usr/cd.iso/README
    echo "Backup contains: $files" |tee -a /usr/cd.iso/README
    echo " "
    tar -cf /usr/cd.iso/bk.tar $files
    tar -tf /usr/cd.iso/bk.tar

    compress /usr/cd.iso/bk.tar

    echo "Erasing CD...\n"
    /usr/sbin/burncd -s "max" -f /dev/acd0 erase

    echo "Creating ISO filesystem...\n"
    /usr/bin/mkisofs -o /usr/cd.iso/backup.iso /usr/cd.iso

    echo "Burning CD...\n"
    /usr/sbin/burncd -s "max" -f /dev/acd0 data /usr/cd.iso/backup.iso fixate

    echo '====================================================='
    date
    echo '====================================================='
    echo " "

    echo "CD Creation completed."
    strings $log|mail -s "misoper2 Backup Log" root

    This is from a FreeBSD system, but I believe the similar commands exist in
    AIX 5. I wrote this to backup a FreeBSD system. It runs every other day
    via cron at 1:00 AM.

    Instead of "burncd", use "cdrecord". "mkisofs" is in AIX.

    BV
    --------------------------------------------------------

    "If everything is coming your way, then you are in the wrong lane"

    Bill Verzal
    AIX Administrator, Komatsu America
    (847) 970-3726 - direct
    (847) 970-4184 - fax

                 "Patrick B.
                 O'Brien"
                 <pobrien@DOIT.NV. To
                 GOV> aix-l@Princeton.EDU
                 Sent by: IBM AIX cc
                 Discussion List
                 <aix-l@Princeton. Subject
                 EDU> Write one file to a DVD=CDW

                 12/16/2003 10:38
                 AM

                 Please respond to
                      IBM AIX
                  Discussion List
                 <aix-l@Princeton.
                       EDU>

    Creating a backup to a DVD-CDW is done by doing a, /usr/sbin/mkcd -d
    '/dev/cd0' -V 'rootvg'.

    Is it possible to write just a few files to a DVD-CDW more than once, say a
    few files a day for a month?

    Can you provide me the command syntax?

    TIA.


  • Next message: Patrick B. O'Brien: "Re: Write one file to a DVD=CDW"

    Relevant Pages

    • Re: Aix Password Migration from 4.3 to 5.2
      ... I even wrote a script to package up all the users from the old box and then "add" them onto the new box. ... tar -cdvf $TMPDIR/usertrans/$u1.tar $g3 ... echo "...Setting up base groups" ... echo "....untaring the transfered datafiles" ...
      (comp.unix.aix)
    • Re: A silly question about tar
      ... replace echo with tar, and you see that tar is going to try and ... $ echo first.txt ... $ cat first.txt ... I tarred this test directory up into a tarball called first.tar.gz. ...
      (Debian-User)
    • Use tar to append?
      ... I have a backup script which I run on some sort of regular ... I use tar to create an archive, ... echo "Verifying $path...." ... errors in verify" | wall ...
      (Fedora)
    • Re: Use tar to append?
      ... I use tar to create an archive, ... into pieces of CDROM size and write to CDROMs. ... echo "Verifying $path...." ... marginally faster, perhaps, since I compress), but see ...
      (Fedora)
    • Re: how can I exclude file in tar file
      ... Its a shell expansion and NOT a tar option. ... So!will be expanded by the shell and then passed to tar. ... ffzn0xf3:/tmp/x 371$ echo! ...
      (comp.unix.aix)