Re: [SLUG] what tool to mirror/sync data with ?

2003-08-21 Thread mlh
On Tue, 19 Aug 2003 23:01:32 +1000
Mike Lake <[EMAIL PROTECTED]> wrote:

> rsync -rlv --existing [EMAIL PROTECTED]:Mail/* /home/mikel/Mail/

I almost always use -a (archive) with rsync, which covers -r and -l
and other useful opts.


Matt
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] what tool to mirror/sync data with ?

2003-08-19 Thread Mike Lake
On Tue Aug 19, Voytek Eymont wrote:
> what should I use to mirror user data to another Linux machine ?
> I need to initially copy the whole dir, and then, once in a while, check
> for updated docs, and, copy any updated or new files

This is a script that I use to transfer mail from one machine to
another.


#!/bin/sh
# This will rsync mail from Martel to Casteret - you must be on Casteret.

# Check if we are on casteret, if not exit.
if [ $HOSTNAME != casteret ]; then
   echo "You are on $HOSTNAME". 
   echo "You must be on casteret to run this script."
   exit 1
fi

echo "This will rsync mail from Martel to Casteret"
echo "Continue (y/Y) or press any other key to exit?"
# We have to check for a reply!
read REPLY
if [ -z $REPLY ]; then
   echo "You didn't enter anything; try again next time."
   exit 1
fi

# If user has NOT selected y/Y then exit.
if [ $REPLY != "y" ] && [ $REPLY != "Y" ]; then
exit 0
fi

# Otherwise we continue.
rsync -rlv --existing [EMAIL PROTECTED]:Mail/* /home/mikel/Mail/


and here is another script that copies mail over where I dont want to
over write existing mail.


#!/bin/sh

# Check if we are on martel, if not exit.
if [ $HOSTNAME != martel ]; then
   echo "You are on $HOSTNAME". 
   echo "You must be on martel to run this script."
   exit 1
fi

# This will check that all the mail files in the directory are of zero length
# i.e. they have already been read and saved away and we wont be writing over
# the top of previous mail.
# (try instead ls -s only )
if [ `ls -l | tr -s ' ' | cut -d ' ' -f5,9 | grep -v copy | cut -d ' ' -f1 | grep -v 
0` ]; then
echo 'There are non empty mail files! This program will exit.'
ls -l | tr -s ' ' | cut -d ' ' -f5,6,7,9
echo
exit
fi

echo "This will rsync existing mail files from:"
echo "Casteret/Mozilla/Triode Folder --> Martel/Mutt/Casteret Folder"
echo "Continue (y/Y) or press any other key to exit?"
# We have to check for a reply!
read REPLY
if [ -z $REPLY ]; then
   echo "You didn't enter anything; try again next time."
   exit 1
fi

# If user has NOT selected y/Y then exit.
if [ $REPLY != "y" ] && [ $REPLY != "Y" ]; then
exit 0
fi

# Otherwise we continue.

rsync -rlv --existing [EMAIL PROTECTED]:.mozilla/Mail/mail.triode.net.au/* 
/home/mikel/Mail/From_Casteret/
echo
echo "Finished"
echo
-

That should also show you how to use rsync :-)

-- 
Executive ability is prominent in your make-up.

Mike Lake
Caver, Linux enthusiast and interested in anything technical.
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] what tool to mirror/sync data with ?

2003-08-18 Thread Michael Sztachanski
Voytek,

use rsync. Excellent package.Let me know how you do.

cheers

Michael

--
Michael Sztachanski
Consulting Engineer
m: +61 410 547593

DATAPAC



On Tue, 2003-08-19 at 21:18, Voytek Eymont wrote:
> what should I use to mirror user data to another Linux machine ?
> 
> I need to initially copy the whole dir, and then, once in a while, check
> for updated docs, and, copy any updated or new files
> 
> 
> 
> Voytek Eymont
> -- 
> SLUG - Sydney Linux User's Group - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
> 


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] what tool to mirror/sync data with ?

2003-08-18 Thread Ken Foskey
On Tue, 2003-08-19 at 21:18, Voytek Eymont wrote:
> what should I use to mirror user data to another Linux machine ?
> 
> I need to initially copy the whole dir, and then, once in a while, check
> for updated docs, and, copy any updated or new files

look up rsync

-- 
Thanks
KenF
OpenOffice.org developer

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] what tool to mirror/sync data with ?

2003-08-18 Thread John Clarke
On Tue, Aug 19, 2003 at 11:18:55AM +, Voytek Eymont wrote:

> what should I use to mirror user data to another Linux machine ?

rsync.


Cheers,

John
-- 
whois [EMAIL PROTECTED]
GPG key id: 0xD59C360F
http://kirriwa.net/john/
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


[SLUG] what tool to mirror/sync data with ?

2003-08-18 Thread Voytek Eymont
what should I use to mirror user data to another Linux machine ?

I need to initially copy the whole dir, and then, once in a while, check
for updated docs, and, copy any updated or new files



Voytek Eymont
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug