Re: How do I move an account... A few more details... and more

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter,
Again thank you. It will be a few days before I will get to do all of this. Let you know how it goes.


Sorry about the CC.  I am new at this, did not know.

Get your toes warm,
Don


At 11:01 PM 12/28/2004, you wrote:
On Wednesday 29 December 2004 01:09, Don wrote:
> Peter,
> Thanks for the verbose answer, I needed that.
>
> This info is great... Thanks again.
>
> I got the message about copying the lines.
>
> After I accomplish this, I will install FC3 into my RH7.2  I would like to
> use this system as a backup system if the first ever goes down.  Can you
> point me in a direction for this.  It sounds like I might be able to use
> rsync for this.  Do you know of any how to docs to run to machines in
> parallel?
> Don
Don,

sounds like I can congratulate you to reaching the first level of paranoia ;)

Seriously, I'm doing something similar. I have a server with 3 mirror raid 1,
tape onsite and DVD-R offsite backups (that' what they call paranoia level 6
I was told ;) and I still keep a spare machine around with all the home
directories and some other file systems sync'd to it.

To set that up, you'll have to do a few steps but its not that difficult. I
assume that the hostname for the system you're trying to backup is called
serv1 and the system you back up to is fs. I also assume you're initiating
the backup from serv1 - you can do it the other way around too if you want,
it doesn't really matter, then just run the instructions the other way round.

1) set up ssh to allow you login without password. I've had some people tell
me its a security hole, but how else do you automate the backup? To do that,
you need to login on serv1 with an account that has permissions to read all
files you want to back up. Usually that will be root. Then you run (if you
have not done that before) ssh-keygen -t dsa. That will generate you dsa keys
(saving them in the suggested default location is a good idea). Then copy the
public key (a file called id_dsa.pub) to the backup server fs. Login there as
root (needed to create files owned by people other than you) and then (if you
haven't done that blah blah) create a directory called .ssh in the home
directory of root. Make sure the permissions are 600 on that directory
(security reasons). Then move the id_dsa.pub file you generated on serv1
to /root/.ssh/authorized_keys (if the file already exists, append the key to
it) and make sure that file too has 600 permissions. Once you have done that,
go back to serv1 and try login with ssh - it should let you in without a
password.

2) once you set that up you need to figure out where you want to make your
backup files to. I have a separate filesystem mounted as /backup/serv1-home
but you can sync directly to /home if you want to. Make sure you got enough
disk space. Then go back to serv1 and create youself a shell script with an
rsync script. For me, my script looks a lot like that:

#!/bin/bash
rsync --delete -av -e ssh /home fs:/backup/serv1-home
x=$?
if [ $x -ne 0 ] ; then
        echo "Backup Failed";
else
        echo "Backup Completed";
fi
exit $x

Yes, I know there are few things you can improve there but I removed a ton of
stuff I didn't need to show the basic concept. What it does is execute rsync
through ssh (for the rest of the switches, please refer to the man page - too
lazy to explain it all, its almost 2am and my toes are cold)

You should be able to execute that script and it should make the first copy of
the data. Verify that everything went ok and then run the script a few times
and measure the wallclock time it takes... That should show you how often you
can make the backup. If its a local network and not much going on on the
systems, then once a hour should be fine, otherwise once a day would be
good...


3) Once you can run that scriptlet by hand without problems, you can make a
symbolic link from /etc/cron.hourly (or .daily) to your script - and you
should be all set. You might want to remove the -v from the rsync then as
well and also remove the echo for backup complete - that way you will only
get an email output of your cron job if there were any errors with the
backup...

Hope that helps - its fairly straight forward... If you want to do a true sync
(where you can run both boxes at the same time) you'll need something like
gfs with shared storage and so on - way more effort and difficulty than it is
worth...


Peter.

PS: Many people consider it bad manners if you CC them on responses to the
list - that way I get 2 copies of the email, one in the mailing list folder
and one in my inbox...

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux