Skip to content

Month: March 2010

nautilus file manager startup in chosen directory from command line

To start up nautilus in a given directory from command line, simply type

nautilus <dirname> &

remember that . is a name for the current directory.  So nautilus . & will open a nautilus file manager in whatever directory the terminal is in.  This is the inverse of hitting the f4 key in nautilus which opens an xterm in the same directory that konqueror is in.

–Joel

Use algol:/root/tapebackup/backup-thuban-to-magtape.sh to create tape backups of Thuban

To create a tape backup of Thuban, insert an SDLT tape into Algol’s SDLT tape drive, ssh into Algol as root, and run /root/tapebackup/backup-thuban-to-magtape.sh.

This script writes a log file into /root/tapebackup that should be reviewed for any problems that tar might have encountered during the backup process. See the script for details.

Assuming the backup tape is written successfully (check the log file), make sure it’s actually readable by running /root/tapebackup/tar-tvf-magtape.sh. This script will prompt you for a date in ‘YYYY-MM-DD’ format (supply the date the tape was written) and will then perform a ‘tar -tvf’ on the tape, writing stdout to tar-tvf-YYYY-MM-DD.log and stderr to tar-tvf-YYYY-MM-DD.err. If the tar tvf command completes successfully, and the .err file is empty then we can have some confidence the data on the tape is readable — and we have an searchable index of the tapes contents.

For example, if you want to know what ‘.sh’ files exist in any subdirectory of /data/psrdata/usr5/1913gr/’ in any of the backup tapes, you can cd to algol:/root/tapebackup and issue the following command (note the lack of leading ‘/’, which is not present in the ‘tar -tvf’ filepaths):

grep 'data/psrdata/usr5/1913gr/' tar-tvf*.log | grep '\.sh'

…which will generate a listing like this:


tar-tvf-2010-07-01.log:-rwxrwxr-x jweisber/pulsar 3017 2010-04-06 15:08:50 data/psrdata/usr5/1913gr/tempo2010/tempoloop-gl1.sh
tar-tvf-2010-07-01.log:-rwxrwxr-x jweisber/pulsar 2801 2009-12-09 14:08:08 data/psrdata/usr5/1913gr/tempo2008/tempoloop-r-s.sh
tar-tvf-2010-07-01.log:-rwxrwx--- jweisber/pulsar 2256 2009-08-20 01:38:51 data/psrdata/usr5/1913gr/tempo2008/tempoloopfordavid.sh
tar-tvf-2010-07-01.log:-rwxrwxr-x jweisber/pulsar 3017 2010-02-16 09:33:16 data/psrdata/usr5/1913gr/tempo2008/tempoloop-gl1.sh
tar-tvf-2010-07-01.log:-rwxrwxr-x jweisber/pulsar 3017 2010-03-21 17:27:19 data/psrdata/usr5/1913gr/tempo2008/tempoloop-gl2.sh

Must supply ‘-P’ arg when extracting files from Thuban backup SDLT tape

When restoring files from a Thuban SDLT Backup tape (via Algol’s SDLT tape drive) you must specify the ‘-P’ argument’ to tar, like so:

tar -xvPf /dev/nst1 $RESTOREFILE

If '-P' is not specified, a random set of symlinks in the restored file set will end up being zero length regular files rather than symlinks.

Note that even when you supply the ‘-P’ option, the original date on the symlink is not restored, but is given the current date instead.

This bug doesn’t seem to manifest for trivially small backups, but definitely manifests in our Thuban backups.

This bug is apparently due to a race condition that occurs while tar is restoring the symlink.

See this website for a more in-depth explanation.