
Fri Feb 27 17:13:45 MST 2004


trials: summary of previous failed/awkward trials:
	* CCC = no easy/obvious way to exclude passage into network 
	directories that copy local and remote mntd filesystem onto target;
	alterntive is to turn off all automounting at time of each backup
	* ditto = no way to exlude files, unless break job into pieces or use
	massive "bom" that lists all files/dirs->unwanted xtra filesystem copy
	* psync = same
	* rsync = powerful exclude capability, but doesn't copy resource forks

solution-1: dd-031227
	* dd = perfect clone; but not clear that all info copied unless
	target drive is same size as source, and must use target ~ src 
	even for src not full

solution-2: clone-040227
	* mix of
		rsync - for root level dirs with:
			no resource forks;
			subdirs that should not be dropped into:
				exclude with patterns
			stubs for /etc, /automount copied with same
				ownerships, permissions
		ditto - for root level dirs with:
			resource forks;
			no network stuff == automount 
		bless after transfer		

	clone on 18.5 gig partition of 60 gig drive
	to which 13 gig pbg4 root dir copied as above

	appeared to be ~ exact clone:
		nearly exact replica of du -xsk * output
		booted from firewire with clone - ok for:
			network stuff = mail, rlogin, automount
			same accounts/passwds
			not tested beyond this

	*except* for owner-group and perms of root-level symlinks and mach.sym:
		different o-g and perms: /etc, /tmp, /var
		different g: /mach.sym
		different o-g: /mach
		absent after boot/test/eject of clone drive: /mntA, /mntroot
			[present after copy]

	2nd trial of clone:
		automount recreated /mntA, /mntroot, but with similarly odd
		o-g+perms;
		system worked fine on network from cloned drive; all ok...

----------------------------------------------------------------------


OLD MACOS RESOURCE FORKS: checked for what root level dirs/files have them?
done before above copy (solution-2):

find -x /Net* -type d -exec lsmac -ap {} \; | grep "^[^ ][^ ][^ ][^ ][^ ][^
][ ][ ]*[A-Za-z][A-Za-z]*[ ][A-Za-z]"

	no resource forks for:
	/sw, /opt, /sbin, /bin, /dev, /automount, 
	/private, /usr, /Users
	/cores, /.vol, /.Trashes
	/Documents, /Desktop Folder, /Install_Resources, /Networks, 
	/Temporary Items, /TheVolumeSettingsFolder, /Volumes, 
	files: /clone*, /mach[._]*, /.??*, 
	symlinks: /mntA, /mntroot, /mach, /etc, /tmp, /var, 

	resource fork(s) found in (or associated with, if file):
	/Applications, /Applications (Mac OS 9), /Developer, 
	/Library, /System, /System Folder, 
	files: /Macintosh HD, /Desktop D[BF],

----------------------------------------------------------------------


CLEANUP before above copy (solution-2):
	cleaned up root dir/files:
		-> only system dir/files at root level, except one
		user/admin dir = clone-info;
		Volumes has only mount points autoset by system;
		rmd stuff: .xfig*, lib, Macintosh HD, ????
		mvd various files/dirs -> clone-info: 
			previous clone trials, 
			file/dir lists for ex/include
			new backup scripts (mkbackup ...)

----------------------------------------------------------------------


du -xsk * = check on quality of solution-2 clone:

root@pbg4 [01:18:32]  / (3:213)# du -xsk *
3145876 Applications
174508  Applications (Mac OS 9)
192 Desktop DB
1496 Desktop DF
0 Desktop Folder
908104  Developer
47824   Documents
24  Install_Resources
1620252 Library
60  Macintosh HD
3 Network
1366504 System
159348  System Folder
0 Temporary Items
0 TheVolumeSettingsFolder
3475808 Users
4 Volumes
1 automount
3104 bin
222020  clone-info
0 cores
du: dev/fd/3: Bad file descriptor
du: dev/fd/4: Bad file descriptor
0 dev
4 etc
4 mach
556 mach.sym
3736 mach_kernel
4 mntA
4 mntroot
393456  opt
161004  private
1968 sbin
360860  sw
4 tmp
1046704 usr
4 var


jar@pbg4 [01:20:33]  /Volumes/LaCie-1 (2:578)$ sudo du -xsk *
Password:
3145876 Applications
174508  Applications (Mac OS 9)
192     Desktop DB
1496    Desktop DF
0       Desktop Folder
908104  Developer
47824   Documents
24      Install_Resources
1620252 Library
12      Network
1366552 System
159348  System Folder
3475808 Users
0       Volumes
0       automount
3104    bin
181724  clone-info
0       cores
12      dev
4       etc
4       mach
556     mach.sym
3736    mach_kernel
4       mntA
4       mntroot
393456  opt
160988  private
1968    sbin
360860  sw
4       tmp
1046712 usr
4       var

----------------------------------------------------------------------
----------------------------------------------------------------------


CLEANUP done just before solution-1 clone = dd-031227

-rw-r--r--  1 jar  admin  2019 26 Dec 19:18 clone-uid-corrections.txt

1. cleaned up uid on files/directories that may/did date to time when
jar as 1st admin was uid=501 == before switched to jar uid=1000 to be
consistent with sgi network

previously had cleaned up many more uid=501 inconsistencies

2. prompted by failure of ccc cloned drive to boot with old settings in effect
(booted as if fresh install == no previous login)

3. above problem may be due to an assumption by mac osx that the admin user is
uid=50[12], and if these not found in user list (netinfo), then ...

4. as protection, created user pbg4 uid=501 gid=501 with admin priv to ensure
501 slot filled.

5. as protection, enabled root account, so if disaster can login as root
(perhaps) and attempt correction.



**********

changed owner to jar from pbg4 on:

	drwx------  2 pbg4  admin  68 24 Dec 23:49 ./.Trashes/501
	-rwxrwxrwx  1 pbg4  staff  15364 26 Dec 02:30 ./Applications/.DS_Store
	-rwxrwxrwx  1 pbg4  staff  6148  8 Nov 07:46 ./Install_Resources/.DS_Store
	-rw-r--r--  1 pbg4  staff  1063  2 Jul 16:57 ./Install_Resources/License.rtf
	-rw-r--r--  1 pbg4  staff  7423  8 Nov 07:43 ./Install_Resources/ReadMe.rtf
	-rw-r--r--  1 pbg4  staff  382  8 Nov 07:45 ./Install_Resources/Welcome.rtf
	-rw-r--r--  1 pbg4  admin  375 26 Dec 03:35 ./Library/Preferences/com.apple.SoftwareUpdate.plist
	drwxr-xr-x  36 pbg4  staff  1224 12 Dec 22:23 ./usr/local/lib
	-rwxrwxrwx  1 pbg4  staff  6148  8 Nov 07:46 ./usr/local/lib/.DS_Store
	-rwxr-xr-x  1 pbg4  staff  461940 10 Oct 03:02 ./usr/local/lib/libreadline.4.3.dylib
	-rwxr-xr-x  1 pbg4  staff  568496 10 Oct 03:02 ./usr/local/lib/libreadline.a


**********

did not change owner on: [could not justify]

-rw-------  1 pbg4  wheel  154216 26 Dec 03:37 ./private/var/vm/app_profile/1f5_data
-rw-------  1 pbg4  wheel  736 26 Dec 03:37 ./private/var/vm/app_profile/1f5_names


also did not change owner 
	on symlinks 
	on owners other than 501 (e.g., 601, coming from 3rd party installs)
	on directories under /Users/pbg4
			or traceable to pbg4 (e.g., the two above)
