How I make a backup / Clone of my White Box Openstep Machine.

Started by Apple2guy, December 02, 2023, 08:20:46 AM

Previous topic - Next topic

Apple2guy

Here is the script I use to automate how I clone my Openstep Drive.

This is formatting a drive so it could mess up your system!

This script first formats the drive into 7 4GB partitions
It then uses dump to copy the files from the boot drive to the backup drive
It does give hundreds of "DUMP: bread: lseek fails" but finishes, and I have successfully booted the cloned drive and ran apps without issues.

My Disktab entry:
QuoteATLAS10K4|MAXTOR ATLAS10K4|MAXTOR ATLAS10K4_36SCA-512:\
   :ty=fixed_rw_scsi:nc#49070:nt#2:ns#730:ss#512:rm#10000:\
   :fp#320:bp#0:ng#0:gs#0:ga#0:ao#0:\
   :os=mach_kernel:z0#64:z1:192:hn=mordor:ro=a:\
   :pa#63:sa#8388608:ba#8192:fa#1024:ca#4:da#4096:ra#10:oa=time:\
   :ia:ta=4.3BSD:aa:\
   :pb#8388671:sb#8388608:bb#8192:fb#1024:cb#4:db#4096:rb#10:ob=time:\
   :ib:tb=4.3BSD:ab:\
   :pc#16777279:sc#8388608:bc#8192:fc#1024:cc#4:dc#4096:rc#10:oc=time:\
   :ic:tc=4.3BSD:ac:\
   :pd#25165887:sd#8388608:bd#8192:fd#1024:cd#4:dd#4096:rd#10:od=time:\
   :id:td=4.3BSD:ad:\
   :pe#33554495:se#8388608:be#8192:fe#1024:ce#4:de#4096:re#10:oe=time:\
   :ie:te=4.3BSD:ae:\
   :pf#41943103:sf#8388608:bf#8192:ff#1024:cf#4:df#4096:rf#10:of=time:\
   :if:tf=4.3BSD:af:\
   :pg#50331711:sg#8388608:bg#8192:fg#1024:cg#4:dg#4096:rg#10:og=time:\
   :ig:tg=4.3BSD:ag:

My fstab:
Quote#
#       DO NOT DELETE THIS FILE, IT IS REQUIRED FOR BOOTING
#
#       This file contains information used to mount local hard disks.
#       Consult your Network and System Administration manual
#       for information on adding local disks.  Information on the format
#       of entries in this file can also be found in the fstab man page.
#
/dev/sd0a / 4.3 rw,noquota,noauto 0 1
/dev/sd0b /Data 4.3 rw,nosuid,noquota 1 2
/dev/sd0c /Media 4.3 rw,nosuid,noquota 1 2
/dev/sd0d /Storage 4.3 rw,nosuid,noquota 1 2
/dev/sd0e /LocalLibrary 4.3 rw,noquota 1 2
/dev/sd0f /LocalDeveloper 4.3 rw,noquota 1 2
/dev/sd0g /LocalApps 4.3 rw,noquota 1 2

The script: Backup_Rust.txt
Quote#! /bin/sh
#Wipe Backup Drive
echo "Wiping Backup Drive"
disk -h mordor -l Backup -t ATLAS10K4 -i /dev/rsd1h
sleep 1
#Mount backup drives
cd /
echo "Mounting Slices"
mount /dev/sd1a /A1 #Boot drive
echo "A Boot"
sleep 1
mount /dev/sd1b /B1 #Data
echo "B Data"
sleep 1
mount /dev/sd1c /C1 #Media
echo "C Media"
sleep 1
mount /dev/sd1d /D1 #Storage
echo "D Storage"
sleep 1
mount /dev/sd1e /E1 #LocalLibrary
echo "E LocalLibrary"
sleep 1
mount /dev/sd1f /F1 #LocalDeveloper
echo "F LocalDeveloper"
sleep 1
mount /dev/sd1g /G1 #LocalApps
echo "G LocalApps"
sleep 1
#Backup Slices
cd /
echo "Backing Up Slices"
echo "Slice A Boot"
cd /A1 #Boot
echo "Change Dir"
dump 0f - /dev/sd0a | restore -rf -
sleep 1
cd /B1 #Data
echo "Change Dir"
echo "Slice B Data"
dump 0f - /dev/sd0b | restore -rf -
sleep 1
cd /C1 #Media
echo "Change Dir"
echo "Slice C Media"
dump 0f - /dev/sd0c | restore -rf -
sleep 1
cd /D1 #Storage
echo "Change Dir"
echo "Slice D Storage"
dump 0f - /dev/sd0d | restore -rf -
sleep 1
cd /E1 #LocalLibrary
echo "Change Dir"
echo "Slice E LocalLibrary"
dump 0f - /dev/sd0e | restore -rf -
sleep 1
cd /F1 #LocalDeveloper
echo "Change Dir"
echo "Slice F LocalDeveloper"
dump 0f - /dev/sd0f | restore -rf -
sleep 1
cd /G1 #LocalApps
echo "Change Dir"
echo "Slice G LocalApps"
dump 0f - /dev/sd0g | restore -rf -
sleep 1
#UnMount backup drives
cd /
echo "Unmounting Slices"
umount /dev/sd1a #Boot drive
echo "A Boot"
sleep 1
umount /dev/sd1b #Data
echo "B Data"
sleep 1
umount /dev/sd1c #Media
echo "C Media"
sleep 1
umount /dev/sd1d #Storage
echo "D Storage"
sleep 1
umount /dev/sd1e #LocalLibrary
echo "E LocalLibrary"
sleep 1
umount /dev/sd1f #LocalDeveloper
echo "F LocalDeveloper"
sleep 1
umount /dev/sd1g #LocalApps
echo "G LocalApps"
sleep 1
exit

The output minus the "DUMP: bread: lseek fails" errors BACKUP.TXT
Core i7 2600 | Adaptec 2940UW Pro | SMC 9332 Fast Ethernet 10/100 Adapter | Sound Blaster 16 PCI | Nvidia Geforce 1050TI | Openstep 4.2