FedoraThis forum is for the discussion of the Fedora Project.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Has anyone tried any replication software in Fedora yet that worked pretty well? We're looking for something that will work on a Fedora install with Samba installed. I believe rsync comes installed by default, but honestly, that looks like a pain to get set up, and the documentation appears lacking. Ideally, I'd like to find something that will run consistently, and copy files over as needed. Otherwise, something that runs at set times of the day would work as well. This will all be behind a firewall, so it doesn't have to be insanely secure. I'm just hoping there is something that's quick and easy to set up to copy data over on it's own.
Sure, sorry about that. Basically, we're looking to start replicating data from a Windows 2000 Server box to a Fedora box running Samba, as well as replicate from Fedora to Fedora machines. In both these situations, there is quite a bit of data to move, and it needs to be moved most every day, which is why I was looking for something that would run consistenly. (Example: we currently have Replistor running to replicate data between Windows 2000 machines, which is running all the time). So, I was looking to see if there was something out there that would do essentially the same thing, only on the Linux platform.
Your clarification helps some... Replication can mean many things. I use MySQL's realtime database replication for instance to keep multiple database servers in sync. It sounds more like you're talking about filesystem syncrhonization though, copying files to a backup ro central repository server on a schedule. Something like that?
If it's between Linux and Win2K then rsync can work but different than between Linux servers I suspect. Some thoughts and ideas that might help you out:
Via Samba you can mount a shared filesystem on the Win2K server shared by the Linux server *or* vice versa, mount a shared Win2K filesystem on the Linux server. If the latter, you can use rsync between directories to keep them syncrhonized. I recently did this, needing to move a bunch of data on a hard drive in NTFS format to a production Linux server. I know NTFS support exists but I didn't want to chance it on a heavily production box. So I put the drive in a Windows machine, shared it, mounted it in Linux and then used rsync to copy some/all of it. In this case I already had about half of the 80GB of data on the drive on the Linux box. So, no need to copy it all, let rsync figure out what I have, what I don't have, what files are different, and only copy what is necessary. Steps:
Using ssh forces you to authenticate so more difficult to automate or script. So, just generate SSH keys so authentication is handled automatically. Lots of info on this out there, check out "ssh-keygen" for more info.
Thanks a lot for the help. I was able to get that working on with everything except doing Linux to Linux. For some reason, it keeps giving me the error that it can't find the hostname of the machine I'm trying to sync to. However, if I set up the Linux box as a Samba server and mount the share that way, I can make it work... which brings me to another question.
I can create launchers for Rsync to run simply by clicking the icon. All the agruments are specified, and it seems to work great. However, no amount of tinkering has been able to get that launcher working in Task Scheduler. I set it up and point the the launcher I made, and selecting "run now" does absolutely nothing. So, is there any way I can go about getting this to run at set times throughout the day you think? If I can get that working, then I think I should be all set.
Straight Linux<->Linux communication via any method OTHER than Samba would probably involve a TCPIP name resolved connection. Samba on the other hand can work with Netbios names and "locate" machines on the local LAN via broadcast requests for that Netbios name. So, you don't have DNS setup correctly or an /etc/hosts entry for the machines in question.
Try this from "server 1":
# host server2
If you want server1 to be able to locate server2 by name you have to provide it info to do this in either DNS or /etc/hosts. In it's simplest form, just add an entry in /etc/hosts for server2 on 1 and vice versa. For instance, /etc/hosts like this:
Replacing 192.168.0.x with the respective IPs of your servers and the names you want to call them. Now, each should be able to resolve the IP associated with the others name and things like ping, ssh, telnet, rsync and other such commands from one server will be able to locate the other.
When you mention "Task Scheduler" I assume you're talking about cron. Cron is the "scheduler" for Linux that can run things at set times. I'm also assuming you're talking about some graphical front-end to it. I'm not familiar with that, I interact with cron via command-line primarily.
# crontab -l <- Lists the cron entries for user you're logged in as
# crontab -e <- Puts you in an editor, editing your cron entries
A common gotcha.. If you're going to for example run the ping command in a cron entry, do it like this: /bin/ping Give the full path to the command you want to run. When you're logged in interactively you have an environment, a bunch of variables that define your PATH among other things. When commands from cron there is no interactive login associated with the command. There is not PATH variable so it commonly can't find the command you're asking to be run. Reference it with it's full path...
Ok, so far so good. I can get rsync working either via Samba or using SSH directly to the hostname. Still no luck with crontab though, and unfortunately, unless I can get this automated so it's consistently backing up, this solution isn't going to work. Do you know if there is an rsync program file somewhere I can point the cron entry at? Also, no matter what I do, I can't seem to add new entries when I to a crontab -e. I'm not sure if rsync will work with that or not.
So for now, I have a launcher set up that when ran will copy everything over I need, assuming I have mounted the share on the second server. But, pointing to that launcher in task manager and running it does nothing. I can't find anything that looks like an executable rsync program to point to, so I'm kinda at a loss here. So close to working though, there's gotta be a way to get this to run on it's own throughout the day, right?
This is running on Fedora Core v1.0, and using the 'whereis' command I was able to find the executable file for rsync, and setting that up through the Task Scheduler is working now. Just had to specify my arguments in the command line when setting it up, and it appears to be working great now.
So, although it's kinda getting off my topic, the only other thing I'd really like to have set up just in case is the mounting of the other server automatically on startup. I thought most of that went into the /etc/fstab file, but I've never looked into it before now. If I can get that set up and going, I should be set...
Edit: I found my answer in this thread and now have the share set up to mount on it's own on bootup. Restarted a couple times and ran rsync through cron and it's syncing up just fine. w00t!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.