Automatic updating of file on a different machine (server) when user saves a file
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Automatic updating of file on a different machine (server) when user saves a file
Hi,
I just came back from a meeting with someone wo wants this functionality:
When he saves a file on *his* machine, it will automatically get copied onto a server (this is on an office LAN). This is so if there's a virus attack on his machine, he will have an uninfected backup copy.
To make matters worse, the client machines will be WINDOZE. Apparently he's seen this kind of functionality at an office somewhere (he was saying something about "Microsoft" , but my brain has erased that part of the conversation ), and now wants it for himself.
I was thinking about Samba obviously, but the tricky part is doing the copying when the user *saves* a file. This will require hooks into the OS to see when a file is being saved.
*If* I manage to persuade him to switch his client machines to Linux (which would be the ideal choice and make life far easier), how would it be done? I'd have to use the File Alteration MOnitor in the kernel, right?
Would it be possible to write the copying code in a shell script?
Last edited by resetreset; 03-01-2010 at 03:07 AM.
he was saying something about "Microsoft" , but my brain has erased that part of the conversatio
Firstly i think as a nix user you don't have to be closed minded. Microsoft, as much as it has it flaws but so does any OS.
Quote:
When he saves a file on *his* machine, it will automatically get copied onto a server (this is on an office LAN)
Most companies inclusive of small business should have a backup/disaster/contingency recovery plan, if not, that would be the first thing you should be looking into. Most company deploys a incremental daily backup and a full backup every week depending on how critical the data is.
Quote:
This is so if there's a virus attack on his machine, he will have an uninfected backup copy.
if any OS get infected, then all the files depending on the characteristics of the virus would also be infected. So having multiple copies of the infected files be it samba or any filesystem would simply be a waste of resource. Preventative measure would have to be implemented to minimize the risk, i.e. anti virus/malware etc. On compromise, again depending on the characteristic of the virus/malware then a full system scan inclusive of the backups to provide an extensive damage assessment and resolution. If the integrity of the files cannot be ascertained, then theres no point in keeping the infected files other than salvaging as much as possible from a safe OS such as any livecd. By having a samba server to store the backups will simply store the infected file as well unless you implement some sort of real-time scanning using clamav within the nix server and trusting clamav signature db will be most updated (btw no av will provide you with 100% assurance no matter what company).
If you must save 2 copies presuming 1 local, 1 samba. There are quite a number of backup solutions, http://www.linuxquestions.org/questi...e-year-780674/ and look into real-time backup solutions. A quick implementation would be rsync (windows bin) and use windows scheduler, so no need for samba. No need to 'hook' anything which most heuristic av might pick it up as a malware.
Another application you could use is Unison, a file synchroniser which works on various operating systems, is freeware and very easy to configure. Just have a look at it here.
Just run backups of your filestore overnight. That's what most corporate companies do. If you get a virus then it's going to infect the copy too - plus, if you have write access to the network drive, it's quite possible the virus will hunt that location out (many just do a search for all available locations) and do it's dirty work there too!
I can't see any advantage of doing this "on the fly" over a scheduled backup overnight.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.