Subject: backing up using rsync+netatalk

From: Jesse <[email-masked]>
Date: Thu, 13 Sep 2001 13:45:12 -0400

I need to back up a yellow dog linux system but do not have a cd-rom burner 
that is compatible with linux.  We have a cdrom that is attached to a mac 
machine running OS 9.  The idea I have is to use rsync to copy the entire 
machine (yellow dog linux) to a netatalk shared folder (on another PC running 
progeny) and then access the shared folder through the mac and burn backups.  

I'm very new to macintosh's and fairly new to linux administration.  Is this 
a feasible strategy?  I'm particularly worried about file permission mangling 
and any other types of file corruption during the process.

Does anyone have any pointers to a better solution or advice on what to watch 
for?  

TIA,
Jesse

p.s.  Anyone know how to compile rsync on Mac OS 9 or if a binary is 
available?  I can't seem to find anything anywhere?

---

From: Danny Sauer <[email-masked]>
Date: Thu, 13 Sep 2001 14:24:33 -0500

> Does anyone have any pointers to a better solution or advice on what to watch 

If you want to keep permissions right, you could go with something like my
solution.  I use a second machine that I rsync (with all the preservation
options) several machines to, then when it's time to make the backups, I
create the cd images on the linux side using mkisofs.  I prefer to use tar
to make archives with a length equivelent to the CD media I'm using (see
tar --tape-length), because I trust tar to keep the file attributes better
than I do mkisof.  I also don't know how to keep mkisofs from truncating >31
char filenames...

Either way, make the cd image on the *nix side, then just burn the image on
whatever burner software you have.  That way you can do the image transfer
using whatever file transfer method you want instead of needing rsync on the
mac.  You really wouldn't need the second machine in the process either.

--Danny

---

From: Jesse <[email-masked]>
Date: Thu, 13 Sep 2001 16:43:23 -0400

On Thursday 13 September 2001 15:24, you wrote:
> > I need to back up a yellow dog linux system but do not have a cd-rom
> > burner that is compatible with linux.  We have a cdrom that is attached
> > to a mac machine running OS 9.  The idea I have is to use rsync to copy
> > the entire machine (yellow dog linux) to a netatalk shared folder (on
> > another PC running progeny) and then access the shared folder through the
> > mac and burn backups.
> >
> > I'm very new to macintosh's and fairly new to linux administration.  Is
> > this a feasible strategy?  I'm particularly worried about file permission
> > mangling and any other types of file corruption during the process.
> >
> > Does anyone have any pointers to a better solution or advice on what to
> > watch for?
>
> than I do mkisof.  I also don't know how to keep mkisofs from truncating
> >31 char filenames...
>
> using whatever file transfer method you want instead of needing rsync on
> the mac.  You really wouldn't need the second machine in the process
> either.
>
> --Danny

Thanks Danny!  I didn't even think of that.  Funny how most solutions seem to 
resovle themselves using the basic *nix tools like tar.

Thanks again,
Jesse

---

From: Ian Hitchman <[email-masked]>
Date: Fri, 14 Sep 2001 08:52:02 +0100 (BST)

system RedHat 7.0
I use rsync to backup one large netatalk volume to another netatalk box
with ssh. I have found it works very well and have had to recover all data
once after a controller failed. The following is my attempt run as a cron
job..

/usr/bin/rsync --force --ignore-errors --delete --backup
--backup-dir=/mnt/F/inc/staff/ -av -e ssh user@:xxx.xxx.xxx.xxx
/mnt/35gR/home1/ /mnt/C/staff/

/F/inc/staff I use to store the difference  /C/staff/ is the current
backed redundant store or backup & /mnt/35gR/home1/ is the work I am
backing up. I have found it a little slow over ssh but the volume is
roughly 260gig. I found http://samba.anu.edu.au/rsync/ helpful.

All the best,

Ian.

---

From: Nicky Haan <[email-masked]>
Date: Fri, 14 Sep 2001 10:20:33 +0200

Is there a rsync client/server for mac ? and if so, what does it do when i move
files from mac to linux if the filenames arnt something my linuxmachine likes ? i
already have that problem no when i use a program link syncfolders on mac to my
appleshare that files containing / \ * #  : and so on, arnt usable anymore (and yes
i know i should tell our macusers not to do that but i'm already telling them for
over a year and they still are using those filenames .. :(( )

so to resume, is there a rsync client and or server for mac and what does it do
with those file(names)

grtz

--
----------------------------------------
Nicky Haan
Unix/Linux Sysadmin / Systems Engineer
NetCASE Interactive Solutions
Dr. Nolenslaan 140
6136 GV Sittard
Netherlands
Tel: +31(0)46 420 1880
Fax: +31(0)46 420 1881
E-Mail: [email-masked]
Web: www.netcase.nl
----------------------------------------

---

From: Danny Sauer <[email-masked]>
Date: Fri, 14 Sep 2001 08:19:41 -0500

> roughly 260gig. I found http://samba.anu.edu.au/rsync/ helpful.

You might find it noticably faster if you use rsync's -z option to
compress the data.  It might also speed things up some if you go with
the blowfish ciper for ssh (ssh -c blowfish), as it's faster than
the 3des cipher, so your machines will spend less time encrypting/
decrypting and more time spitting data to the wire.  Rsh is even
faster, but then you've gotta deal with the much lower level of
security provided by rsh, which might be OK on a machine that's only
accessible from trusted hosts on a trusted network...

--Danny

---

From: Jesse <[email-masked]>
Date: Fri, 14 Sep 2001 12:44:43 -0400

On Friday 14 September 2001 04:20, Nicky Haan wrote:
> Is there a rsync client/server for mac ? and if so, what does it do when i
> move files from mac to linux if the filenames arnt something my
> linuxmachine likes ? i already have that problem no when i use a program
> link syncfolders on mac to my appleshare that files containing / \ * #  :
> and so on, arnt usable anymore (and yes i know i should tell our macusers
> not to do that but i'm already telling them for over a year and they still
> are using those filenames .. :(( )
>
> so to resume, is there a rsync client and or server for mac and what does
> it do with those file(names)
>
> grtz
>

I had the same problem with a large number of filenames with some documents I 
needed to process with the shell.  I don't know that this will help with 
backups but if you need to fix bad filenames that will be processed with the 
shell I wrote this script.  (watch the email line wrapping )

#!/bin/bash 

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

#  This script will attempt to remove characters which may be
#  unfriendly to the shell from the filenames of the
#  files located in the directory in which it is executed and replace
#  them with an underscore character.  It's currently disabled
#  you'll need to uncomment the mv line below.

self=`basename ${0}`

if [ -z $1 ]; then
        printf "\nUsage: %s\n" ${self}
        printf "\t%s takes a directory as an argument\n" ${self}
        printf "\tthe argument should be an absolute path\n"
        printf "\tto the directory.\n"
        printf "\n"
        printf "For example:\n"
        printf "\t%s /home/guest/directory_to_process\n\n" ${self}
        exit 1
fi

for item in $1/*
do
        # Need this so we are comparing filenames correctly
        item=`basename "${item}"`

        # exclude the script from processing
        if [ "${item}" = "${self}" ]; then
                continue
        fi

        # skip directories
        if [ -d "${item}" ]; then
                continue
        fi

        current_name="${item}"
        fixed_name=`echo -n \'${current_name}\' | sed 
's/[[:blank:][:cntrl:][:punct:]\(\)\{\}]/_/g'`

        # Uncomment the mv command below when ready to use
        #mv "${1}/${current_name}" "${1}/${fixed_name}"

        # comment out the echo command below once your satisfied
        echo ${1}${fixed_name}

done