SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
OSX test
Author Message
Post OSX test 
Hi All

I just tested rdiff-backup under osx and when i backup one hd to
another the text is scrambled.
ie the first capped letter of each file name turns, well it's not utf-8.
one i'm trying to achieve is to make a bootable copy of my main hd
onto another internal drive.
has anyone written such a script using rdiff-b?

thx for any pointers

cornelius

Post OSX test 
Why not cp -a or whatever on osX?

Am Mittwoch 31 August 2005 09:55 schrieb Cornelius Jaeger:
Hi All

I just tested rdiff-backup under osx and when i backup one hd to
another the text is scrambled.
ie the first capped letter of each file name turns, well it's not utf-8.
one i'm trying to achieve is to make a bootable copy of my main hd
onto another internal drive.
has anyone written such a script using rdiff-b?

thx for any pointers

cornelius


_______________________________________________
rdiff-backup-users mailing list at rdiff-backup-users < at > nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL:
http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

--
Vorteile von OpenOffice:
- GRATIS
- einfach zu bedienen
- kompatibel
- portabel
Infos: http://de.openoffice.org/marketing/collaterals/faltflyer_11.pdf

Ich schreibe alle Arbeiten damit.

Post OSX test 
On Aug 31, 2005, at 11:20 AM, Thomas Bettler wrote:

Why not cp -a or whatever on osX?


resource forks, finder meta data, automatic restore, finder bless, remote backups.
here is the script i came up with today.
seems to work.

#!/bin/sh

# admin who receives mail
mailTo="woadmin < at > visualfood.ch ([email]woadmin < at > visualfood.ch[/email])"
# server name, no spaces please
server_name="TVMM"
# excludes, this is the list recommended for osx by apple
#excludes="/tmp /var /Volumes /dev /Network /etc /automount /.vol /mach /mach.sym /.DS_Store /.Trashes /TheFindByContentFolder /TheVolumeSettingsFolder"
excludes="/tmp /var /private/var/tmp /Volumes /dev /Network /etc /automount /.vol /mach /mach.sym /.DS_Store /.Trashes /TheFindByContentFolder /TheVolumeSettingsFolder"
# may not handle device files correctly, so better leave them out
exclude_options="--exclude-device-files"
# How long to keep changes. 1M = 1 month
maxage="2W"
# the source volume
src=/
# the destination volume
dst=/Volumes/hd2/
# Which program to invoke
program=rdiff-backup

# Some basic configuration options; see the manual
other_options="--force -v5 --print-statistics --override-chars-to-quote ''"

########################################################
# Perform backup                                       #
########################################################

# Setup what's needed for status reporting.
test -f /var/${server_name}Daily || echo "${server_name} Daily backups" > /var/log/${server_name}Daily
echo "" >>/var/log/${server_name}Daily
echo "${server_name} Daily" `date` >>/var/log/${server_name}Daily

msg="Backup deemed successful."
appendStatus ()
{
   msg="Backup failed."
   echo "   " $1  >>/var/log/${server_name}Daily
}


# Build a bunch of --exclude ... statements and construct
# a number of arguments to send to rdiff-backup.
for i in $excludes; do
   exclude_options="$exclude_options --exclude $i"
done
options="$exclude_options $other_options"

# Make sure there is a valid place to put the data
if [ -e "$dst" ]; then
  if [ ! -d "$dst" ]; then
     echo "Strange: '$dst' exists, but is not a directory"
         appendStatus "Backup on ${server_name} failed $dst exists but is not a directory"
     exit 1
  fi
  echo "found $dst"
else
  mkdir -p $dst
  echo "created $dst"
fi

# Backup
echo "Doing this: $program $options $src $dst"
echo "Backing up $dst"
$program $options $src $dst

# How did it go?
if [ $? -eq 0 ]; then
    # It went well; removing stuff older than maxage
      $program --force --remove-older-than $maxage $dst
      if [ $? -eq 0 ]; then
        echo "Clean-up OK"
      else
        echo "running this failed (during clean-up):"
         echo "$program --force --remove-older-than $maxage $dst"
             appendStatus "Backup on ${server_name} failed to clean up: $program --force remove-older-than $maxage $dst"
      fi   
    echo "recreating the symlinks and volumes from the exclude list"
        cd "$dst"
    echo "cd to $dst"
    ln -s private/etc etc
    ln -s private/var var
    ln -s private/tmp tmp
    mkdir dev Volumes Network

    # bless the System Folder (OSX only), i've excluded this for now, because repeated backups failed with permission errors YMMV
    #echo "blessing the system folder"
    #bless -folder ${dst}System/Library/CoreServices -bootinfo /usr/standalone/ppc/bootx.bootinfo
else
      # It failed; don't clean up
      echo "running this failed:"
      echo "$program $options $src $dst"
        appendStatus "Backup on ${server_name} failed completely: $program $options $src $dst"
fi

if test "$msg" != "Backup deemed successful."
then
# If sendmail is configured on machine the following will send a mail to somebody

mail -s "${server_name} Daily System Backup" $mailTo <<EOF

This message comes from the Backup_Server.sh script on $server_name.

The daily backup of $server_name did not complete successfully.
$msg
Please refer to the /var/log/${server_name}Daily.log for further details.

EOF
fi
#============================ end ==================================




Cornelius Jaeger,
Member of Visual FOOD GmbH - Software and Multimedia Solutions


http://www.screenfood.ch
http://www.visualfood.ch
Moosstrasse 7
CH-6003 Lucerne
SWITZERLAND


Fon: +41 (0)41 21 0 21 41
Fax: +41 (0)41 21 0 21 43


iChat or AIM nelius < at > mac.com ([email]nelius < at > mac.com[/email])

Post OSX test 
Cornelius Jaeger <cjaeger < at > visualfood.ch>
wrote the following on Wed, 31 Aug 2005 09:55:21 +0200

I just tested rdiff-backup under osx and when i backup one hd to
another the text is scrambled. ie the first capped letter of each
file name turns, well it's not utf-8. one i'm trying to achieve is
to make a bootable copy of my main hd onto another internal drive.
has anyone written such a script using rdiff-b?

Do restores work? The scrambling sounds like rdiff-backup's
intentional behavior when backing up to a non-case-sensitive file
system. Since you are backing up to the same type of file system you
can try

--override-chars-to-quote ''

which tells it not to quote anything.


--
Ben Escoto

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB