SLUG Mailing List Archives
RE: [SLUG] configuration backup to floppy
- To: "'slug@xxxxxxxxxxx'" <slug@xxxxxxxxxxx>
- Subject: RE: [SLUG] configuration backup to floppy
- From: George Vieira <georgev@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed Aug 30 12:05:51 2000
Sorry, my listing file looks like this...
local.import 1 /local/import
local.backup 1 /local/backup
local.bin 1 /local/bin
etc 1 /etc
etc.mail 1 /etc/mail
etc.httpd.conf 1 /etc/httpd/conf
home.httpd.cgi-bin 2 /home/httpd/cgi-bin
etc.sysconfig.network-scripts 1 /etc/sysconfig/network-scripts
etc.sysconfig 1 /etc/sysconfig
From: George Vieira [mailto:georgev@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Wednesday, August 30, 2000 12:00 PM
Subject: [SLUG] configuration backup to floppy
Since we're in the scripting mood...Ok, Ok... maybe some. I have created a
script which basically reads a file in a backs each directory and depth
listed in the file.
I am currently using the find and pipe to cpio to /mnt/floppy but would like
to now change this to just the files and in it's directory structue so:
/home/georgev will copy into /mnt/floppy/home/georgev
/etc/sysconfig will copy into /mnt/floppy/etc/sysconfig <- but only it's
file contents unless specified in the file list
Here is my current (badly written) script which is the cpio version if
anybody would like to help me write it as I'm having troubles creating the
copy and the structure....
echo -e "$BASE: Attempting to mount floppy disk"
mount /dev/fd0 /mnt/floppy -t vfat >/dev/null 2>&1
if [ "$STATUS" = "1" ]
echo -e "$BASE: Already mounted or mount error $STATUS"
echo -e "$BASE: Mounted OK"
while read EXT DEPTH FILES
echo "Backing up $FILES with maximum depth of $DEPTH"
find . -maxdepth $DEPTH -type f -print | cpio -ocvLB -O
done < /local/bin/confbackup.files
echo -e "$BASE: Unmounting Floppy Disk"
PGP Fingerprint : 43DC 92AC 1A82 27B2 E97B 52F1 B60F 301A 38A9 A10C
PGP KeyID: 0x38A9A10C
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug