Set up rsync to mirror mount on Windows Server to mount point on 2nd internal drive

User Name

Remember Me?

Password

Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Set up rsync to mirror mount on Windows Server to mount point on 2nd internal drive

I am running Mandriva 2005 Mini.

I have an NT4 PDC's users folders mounted to /mnt/nt4
I also have a second hard drive in my server mounted as /var

I want to mirror everything in my NT4 mount to /var/archive/

What command would I run to have rsync do this for me? Am I using the right thing (rsync) since I want everything inside /var/archive to be exact (say up to 10 minutes) as everything located on the actual NT4 PDC?

I have used rsync in the past, but was too chicken to try and set it up for fear of losing files on the NT4 server.

My next step is to match, on the Linux server, the users from the NT4 server. Should the NT4 server crash, I can have each workstation (user) map a drive to the Linux server and resume normal operations (access their personal files as well as shared directories).

This is all for a backup for _when_ the NT4 server crashes.

Any suggestions for setting this part up?

I am figuring that I will need to set up SAMBA, and somehow create new users on this Linux server to match the NT4 users, but probably don't need to set SAMBA up as a domain server though.

The --dry-run option will only do a simulation of what would happen. Then if it looks good, take out the --dry-run

yes, you will need to create a samba share in case your NT4 server crashes. Then you can map the users drive on the Mandriva system. Assuming Mandriva 2005 mini has SAMBA, all you need to do is configure /etc/samba/smb.conf (I'm assuming that's the correct path for Mandriva).

Are you using Active Directory on your NT4 box? There is a way to get SAMBA to be in your Active Directory, but I would have to consult my Samba book on how to do this. Wouldn't be a bad thing for me to finally learn how to do this. Otherwise, you would have recreate each user on the samba server which is a pain! So, in the interim of fixing your NT4 system, create a guest account or a dummy SAMBA user.

Here's an example of how I'm going to assume that the users need to access their files temporarily and you do not need security for the time being while you fix your NT4 server. The Linux box will act as a standalone samba file server

vi /etc/samba/smb.conf

Code:

# create a new entry for /etc/samba/smb.conf so Windows users can retrieve files from /var/archive
#this is the SHARE name Windows users need
[nt4]
#So Windows users know what this drive is
comment = NT4 drive
#path to where the NT4 files are on your Linux box
path = /var/archive
#means users can write to this directory. Change to read only = yes if you only want them to read and not write
read only = no
#users can see this on their network neighborhood
public = yes
#allow guests to connect. Check your [global] section for what the guest account name is. On my CentOS it is pcguest by default. Make sure this new account is in the /etc/passwd
guest ok = yes

Now you just tell your Windows users to map to the new drive by right-clicking their MY COMPUTER. I personally like to do it via the command line: