Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   Clone and then copy to a second external drive ?? (https://www.shirt-pocket.com/forums/showthread.php?t=4124)

brantwinter 05-28-2008 07:30 AM

Clone and then copy to a second external drive ??
 
Hi - I have been a happy SD using for a few years now, but I think I must be getting more and more paranoid !

I currently run a full bootable backup to an external USB drive and would like to then copy this to my NAS disk.
I have tried rsync ( manually ) after a SD copy has completed and I am met by all sorst of errors as rsync tries to copy the files across. I have tried runnign my rsync script with sudo but no luck. The errors are strange I/O type errors after rsync has copied about 50Gb of the data.

Does anyone else make a second full copy of theor SD backup after completion, if so how ?

Thanks in advance.

dnanian 05-28-2008 07:58 AM

Just schedule a second copy, either of the first or of the source...

brantwinter 05-28-2008 08:41 AM

Thanks for the reply. I did think of that, but I htought that maybe there was another way of doing it with a clever little rsync script. I had updated my 10.5.2 rsync version from the instructions at teh Bombich site and have made a script:

Code:

#!/bin/bash

# USER=$1 #Don't need this at present

#echo "Backing up ${USER}"

# backup volume
VOLUME='/Volumes/LACIE_160'
SRC='/Volumes/LACIE_160/Users/brantwinter'
DEST='/Volumes/nasdata/Mirrors/LACIE_160/'

# Get device using  'diskutil info ${VOLUME}'
#DEVICE='/dev/disk1s2'

BDISK=`/usr/sbin/diskutil list | awk '$3=="LACIE_160" {print $6}'`

if [ ! -e ${VOLUME} ]
then
  echo "Mounting ${DEVICE} as ${VOLUME}"
  /usr/sbin/diskutil mount $BDISK > /dev/null
else
  echo "${VOLUME} already mounted"
fi

echo "Backing up ${SRC} to ${DEST}"

sudo rsync -aNHAXx --protect-args --fileflags --force-change --delete --timeout=120 ${SRC} ${DEST}

echo "Unmounting ${VOLUME}"
sleep 5
/usr/sbin/diskutil unmount $BDISK > /dev/null


One of the reasons for doing it this way was to just make a second copy of my profile rather than the whole disk if you know what I mean....

I am not sure if rsync is falling over on the permissions or what ? I think I may have read somewhere, for this type of thing to work I need to allow rsync to run as root, or say create a UNIX user called backup and allow the backup user to execute this rsync script as root. I have no idea how to do this though...Any ideas ?

dnanian 05-28-2008 08:47 AM

So, just run SD!'s "Backup - user files".

brantwinter 05-28-2008 08:50 AM

I suppose I just wanted to use some mac UNIX geekery to achieve the same thing :(

dnanian 05-28-2008 09:00 AM

Yeah, I know... but why? :)

brantwinter 05-28-2008 09:01 AM

Sorry - One more thing.

If I backup just the user files using SD to a sparesimage on the second drive, is there any way to shrink it down every now and again. I used to back up to spareimage files and the size of the files just kept growing even though I had removed large files from my profile.

brantwinter 05-28-2008 09:01 AM

I dont know - I was bored :)

brantwinter 05-28-2008 09:23 AM

Maybe I can just add another line to an after run script like:

Code:

hdiutil compact /path/to/.sparseimage

dnanian 05-28-2008 09:28 AM

You'd have to compact in a background process. e.g.

Code:

nohup /bin/bash -c "sleep 30; hdiutil compact image-path-or-variable" &


All times are GMT -4. The time now is 02:43 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.