|
I have 2 web servers, one CentOS, the other win2k3, both set up with apache. What I would like to accomplish is that when a file changes in /var/www/html (on the linux machine) it's automatically mirrored to the other server (the windows machine) via FTP. I looked into rsync but I don't think it can do what I need. I also tried to google for other solutions, and found unison, but as I understand it, it will not run automatically. Is this possible in any way or am I crazy for thinking it up?
|
# ¿ Apr 30, 2007 10:08 |
|
|
# ¿ Apr 20, 2024 02:11 |
|
teapot posted:Both rsync and unison will be able to do that (though none of then use FTP -- it's not a good protocol anyway), however they won't start immediately after a file is changed. You can make a simple shell script that checks if timestamp on the directory (or any directory in a subtree) changed since the last time the directory was checked, and only then run rsync or other utility. The script can run in an infinite loop or be called from cron. None of those solutions are ideal or in fact solve the problem, and as I've noted I already looked at those utilities. Here it is again what I'm trying to accomplish with different words: automatically mirror files to another server via FTP as they change. By the way there is software for windows that can do this, but if it can't be done in linux I guess I can live with that.
|
# ¿ Apr 30, 2007 10:50 |
|
GringoGrande posted:You could check out inotify-tools, which should be able to take care of that. (If your kernel is >=2.6.13) This would be good but my kernel is 2.6.9. So I will look into a shell script and see how that goes. Thanks for the help although I'm still open to suggestions.
|
# ¿ Apr 30, 2007 11:23 |
|
My server suddenly decided to die. When I tried to log in it kept saying access denied, so I rebooted only to be faced with a message informing me that the inittab file was not found. So now I would like to recover some data (web and mysql stuff) before installing ubuntu on it but right now I only have a fedora 7 disk on hand (downloading ubuntu right now). I got into the shell but it won't let me mount /dev/sda2 because /etc/fstab was not found. Am I screwed?
|
# ¿ Aug 11, 2007 10:35 |
|
Mounting /dev/sda2 on /mnt failed: Invalid argument
|
# ¿ Aug 11, 2007 11:02 |
|
Accipiter posted:Err... are you using some kind of goofy charset on sda2? quote:2. What does 'fdisk -l /dev/sda' say? It says it's a 200 GB disk with 2 partitions /dev/sda1 flagged boot, system linux /dev/sda2 system linux LVM I can mount /dev/sda1 and see a bunch of .EL and .img files, grub, lost+found and such.
|
# ¿ Aug 11, 2007 11:14 |
|
Accipiter posted:What the hell kind of bullshit system are you using? I'm booting off a fedora 7 disk with 'linux rescue'. Also there doesn't seem to be a vgscan command.
|
# ¿ Aug 11, 2007 11:51 |
|
code:
|
# ¿ Aug 11, 2007 12:01 |
|
Accipiter posted:Okay so do 'ls -al /dev/VolGroup00/' and paste what that says. That it cannot access /dev/VolGroup00/ no such file or directory.
|
# ¿ Aug 11, 2007 12:41 |
|
Yes! That did the trick. Now, I was told that probably the /etc directory got wiped, but as far as I can tell it's still there. So at this point I'm not sure how to proceed. edit: I found 3 password files. passwd, passwd- and passwd.OLD. The first 2 has 100+ usernames I don't recognise. passwd.OLD has 1 account (mine, in addition to all the system accounts) but accounts missing. indigoe fucked around with this message at 13:22 on Aug 11, 2007 |
# ¿ Aug 11, 2007 13:16 |
|
Yes, I can access the whole contents of the drive. But I would also like to find out what happened and why I have these unknown passwd files, and it would be nice if I could recover inittab somehow. I have 2 disks but the second one is NTFS. I can't mount it from the recovery session to copy the files I want to save. I guess the other option would be to resize the partition and create a second one and save the files there.
|
# ¿ Aug 11, 2007 13:59 |
|
Well, the server served 2 purposes, one being my web server for messing around with stuff and second my mp3 storage. I can see a LOT of failed login attempts spanning a number of days. Someone was still attempting logins as I shut the system off. By the looks of it someone DID get in but surprisingly didn't format the drives just made sure it's going to be difficult to reboot the system. edit: Looks like the system has been compromised for much longer than a few days. The security log only goes back 1 month but in that time I found 4 root logins for 3 different IP addresses all in different countries. I've learnt 2 important lessons so far: make the root password more secure, and move ssh to a different port. Any ideas how I can get the system to boot up again? Is it worth the effort? I really appreciate the help so far. indigoe fucked around with this message at 14:59 on Aug 11, 2007 |
# ¿ Aug 11, 2007 14:46 |
|
Yeah you are right. I didn't think of disabling remote root login but it sounds like a good idea. Although that wouldn't stop someone from hammering it with attempts. I managed to back up some stuff on a new logical volume and formatted the old one. I just hope I didn't forget to back something up. I also didn't think to look at security logs and such - as far as I knew everything was working fine. And while I'm interested in learning about this, most of the time I just want the server to be there and work and not have to worry about it. Thanks again for the help.
|
# ¿ Aug 11, 2007 18:46 |
|
I'm attempting to run several virtualised machines using xen. I have them up and running fine, however, I would like all of them to have access to a shared partition, let's call it /dev/LogVol00/data. Now this is mounted by the host, and when I start up a virtual pc I get the message the device is mounted in the privileged domain and so cannot be mounted as guest. Is there any way around this? I know the answer may be as simple as 'not possible' in which case I have a backup plan: map the directory on that partition as a network share on each virtual pc. Or am I crazy for thinking that would be a good idea?
|
# ¿ Sep 18, 2007 07:39 |
|
poemdexter posted:I'm running Kubuntu Fiesty with a fresh install. I basically want to access my Mysql database via SSH from school so that my group can work on it during class and I can do the real work/fix their mistakes at home. If you have a router between the server and the internet, the port needs to be forwarded. Mysql needs to have a user created (I recommend limited privilieges for security reasons) that is able to connect from outside. This is defined by the host field in mysql.user table. % is the mask for all hosts (by default all users must connect from localhost) if you don't know the school's ip address. RoundsToZero posted:You generally don't want multiple filesystem drivers hammering the same block device at the same time, which is why it won't let you mount the filesystem twice. The network method should be fine as long performance is good enough. VMware has a "shared folders" feature that doesn't require the network, but in my experience it's actually slower than just using the network. Thanks, that explains it. I'm not too worried about the load on the server and the purpose of the whole thing is to have various test environments with some shared files. Now I'm trying to get NFS to work but it keeps giving me access denied when I try to mount. I also get these errors in /var/log/messages (on the server) when I attempt to mount the share with the client code:
indigoe fucked around with this message at 05:14 on Sep 19, 2007 |
# ¿ Sep 19, 2007 05:05 |
|
I came up with this one liner to get an idea how many of what processes are running. ps -aeo cmd | uniq -c | sort -gr | grep -v ' 1 ' It produces the unexpected result where it doesn't quite group everything as it should and I just can't see why. code:
|
# ¿ Oct 27, 2009 23:28 |
|
|
# ¿ Apr 20, 2024 02:11 |
|
covener posted:sort before uniq, as uniq only discards successive matches. (then sort again to pickup the counts) Hey thanks
|
# ¿ Oct 28, 2009 02:04 |