Re: SCP backup script

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Kurt Granroth
Date:  
To: plug-discuss
Subject: Re: SCP backup script
On Tuesday 25 January 2005 01:59 pm, Mike Hoy wrote:
> i'm trying to write a backup script using scp from my laptop to my server.
> I stumbled across some instructions on the web but i'm not quite getting
> what i want.
> this works:
>
> scp -rp /home/user/music/*.mp3
> root@192.168.2.161:/mnt/LaptopBackup/user/music/
>
> and all of the *.mp3's copy over.
>
> that would be fine if I had all of my *.mp3 files in one big directory
> but i don't
>
> in /music i have more directories for each band..
>
> i would just like to copy an entire directory with all of it's sub
> directories.
>
> then later i'll just make a script out of it.


In a simple case like this, I would use rsync instead. Something like:

rsync -e ssh -a /home/user/music/*
root@192.168.2.161:/mnt/LaptopBackup/user/music/

When you finally get around to putting it in a script, I would suggest *not*
doing so and instead using rsnapshot (http://www.rsnapshot.org). It's a
wrapper of sorts around rsync that makes for a phenomenally useful as well as
easy to setup backup solution.

Kurt
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss