squeak!
Syllabus Homepage
Course Overview
Course resources
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Common errors
Internet Glossary
About Your Instructor
Credits: This site powered by the vi text editor, apache webserver, perl scripting, and Debian linux.
squeak!

solaris8 - Day 4

Goals

In this session you will:
  • backup your box
  • control your discspace usage

POST

  1. log into your machine as a non-priviliged user
  2. how's your box doing: discspace, load, users, etc?
  3. become root and take your machine down to a single-user (maintenance) mode.
  4. what controls the order of events on the transition to single-user mode?
  5. bring your box up to a normal multiuser mode
  6. what controls the order of events on the transition to multi-user mode?
  7. assume the following mountpoints:
    /dev/dsk/c0t0d0s0	/swap
    /dev/dsk/c0t0d0s1	/
    /dev/dsk/c0t0d0s3	/usr
    /dev/dsk/c0t0d0s4	/home
    
    How would you handle a filesystem corruption problem on:
    • s4?
    • s3?
    • s1?
    • where is s2?

backups

workstation backups

  • commercial products v. roll-your-own
  • full v. incremental backups
  • offsite storage
  • Whole OS v. data and config files
  • exclusions
  • leading / stripped?

before restoring from backup, make sure your backup is better than what you've got now...

the usual suspects

  1. tar, useful for backing up hierarchies (dirs and subdirs). gtar versions will let you append and inline compress.
    • create
      • tar -cvf target.tar source (no tape)
      • tar -cv /dev/tapedevice source (tape)
      • tar -czv /dev/tapedevice source (tape, inlined gz)
    • list tar -tvf tarball.tar [path]
    • extract tar -xvf tarball.tar [path]

    • check to see if the leading path is stored
    • extract to STDOUT with a switch
    • may inline compression, or compress after the fact (usually gzip)
    • use exclusion files to exclude files you don't want to back up.
  2. cpio, useful for incremental backups.
  3. pax, the posix-compliant archiver. Default format is ustar (posix tar)
    • four modes: list (default), read, write, copy

    • create a cpio archive: find output | pax -x cpio -w -f cpio.pax
    • create a tar archive: find output | pax -w -f tarball.pax
    • append/update a tar archive: find output | pax -a -w -f tarball.pax

    • list an archive: pax -v -f archive.pax
    • extract an archive: pax -r 'files' < archive.pax
  4. dump-style utilities, useful for non-portable, schedulable backups
    • dump works on hierarchies, and does incrementals internally
    • incrementals handled by numbers. Each incremental backs up files changed since last lower-numbered backup
      • 0 traditional for monthly backups. Done from single-user runlevel
      • 5 traditional for weekly backups
      • 9 traditional for daily backups
    • dump is not portable between systems
    • rudimentary compression
    • in root dir, unpacks in place; otherwise relative to local dir

    • create ufsdump levelf target.dump source
    • list ufsrestore -tf file.dump filename
    • extract ufsrestore -rf file.dump filename

software management

You will install software:
  • from sourcecode
  • from precompiled binaries

package management with the CLI tools

  • installing from the spool
    • files are not copied to the spool directory, they are actually spooled: pkgadd -d device-name -s spooldir pkgid ; pkginfo -d spooldir | grep pkgid
    • the default location to look for packages is /var/spool/package
  • installing individual packages
    • pkgadd -d directory pkgid
    • pkgchk -v pkgid
  • information about installed packages
    • pkginfo -l pkgid
  • removing installed packages
    • pkgrm pkgid

      note that pkgrm by itself will attempt to remove all packages

package management with admintool

patch management

Solaris 2.6 and later use command line tools to apply patches, although scripts are also packed.

Support customers get CDs every few weeks. Nonsupported customers grab patches off the net: http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/patch-access

  • showrev -p, patchadd -p show patches
  • pkgparam pkgid PATCHLIST shows patches for a given pkg
  • patchadd patchid shows patches for a given pkg
  • patchrm patchid shows patches for a given pkg

Homework


http://www.mousetrap.net/syllabus/solaris8/day4.html
$Id: day4.orb,v 1.6 2002/10/27 20:59:53 mouse Exp $


© 1994-2002 jason carr.
distributed under the terms of the GNU Free Documentation License.

jason carr

Reminders

  • Classroom temperature can be wildly variable. Dress lightly and bring layers.
  • your username is based on the class title and the last two digits of your workstation's hostname.
  • remember to take your work with you.