[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Backup script question...
On Tue, 2004-06-29 at 14:28, Ken Keefe wrote:
> I wrote a very basic bash script that tars a set of critical files and
> then scp's the tar file to a server of mine. For right now it asks me
> for a password for the remote user and I enter it by hand. How can I
> accomplish this same sort of thing but in an automated fashion? I'd like
> to be able to add a cron job so it does this everyday at such and such
> time even when I am not around to feed it the password... for obvious
> security reasons, I'd rather not store my password in the script or some
> other file...
>
> What other suggestions do people have for backing stuff up?
>
> I made the silly mistake of typing rm -rf name * instead of rm -rf name*
> and I need to get serious about backing up my data. Luckily I had, just
> by chance, created a tar file of the stuff I lost.
>
> Ken Keefe
There are many ways to skin this cat...
How about using cURL with an FTP interface? or Perhaps setting up a
mount (NFS or SMB) and coping it over? (this could work really well
through a VPN)
Also, the suggestion has been made to create your ssh-keys
(~/.ssh/id_dsa for your home machine, the id_dsa.pub gets copied to the
remote machine as ~/.ssh/authorized_keys2), but when you create them,
make the pass-phrases blank and then it won't prompt you for a password
when ssh-ing.
Another utility that was mentioned is rsync. This can be an incredible
backup tool, and you'll need to read up on it in the man pages to see
just how powerful it can be. Can be run as a server, which would
eliminate the need for the ssh prompting anyway... (another approach)
There's another utility that has been created a bit more powerful than
rsync, called unison. It must run as a daemon, to monitor the
file-systems of the machines it's on, keeping track of any changes and
then instantly implements them on the remote machines. While I've never
used this one, I've read about it and it looks really slick. :)
Hope this helps!
--
Travis Owens <openbook@linuxmds.com>
-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.