LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-01-2010, 04:05 AM   #1
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
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 04:07 AM.
 
Old 03-01-2010, 05:09 AM   #2
paranoidx
LQ Newbie
 
Registered: Jul 2006
Posts: 24

Rep: Reputation: 2
Quote:
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.
 
Old 03-01-2010, 06:02 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296
Hello,

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.

Kind regards,

Eric
 
Old 03-01-2010, 09:57 AM   #4
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
I think I found what I was looking for here:
http://inotify-tools.sourceforge.net/

Check out the: "inotifywait example 1" in bold.

Now what I have to do is figure out how to get it to activate when *any* file is written to a particular directory - can anyone offer any help?

Sorry I think that was *in* the example.

Last edited by resetreset; 03-01-2010 at 10:39 AM.
 
Old 03-01-2010, 04:57 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,514

Rep: Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014
I would use ZFS that allows almost unlimited previous versions.
 
Old 03-02-2010, 01:22 PM   #6
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
I don't follow you - unlimited previous versions of what?
 
Old 03-02-2010, 01:32 PM   #7
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 553

Rep: Reputation: 116Reputation: 116
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Zone file(s) problem, datestamps keep updating on secondary DNS server. ipa Linux - Newbie 1 08-05-2008 11:58 AM
Problem updating a shell startup file in SUSE Server 10 Sergei Z Linux - Newbie 4 06-03-2007 11:18 PM
cannot re-enable konqueror automatic updating of directories (file-size) Emmanuel_uk Linux - Newbie 3 06-28-2005 03:01 AM
editor saves duplicate file with tilde after it smaudlin Red Hat 2 12-29-2004 05:37 PM
Getting user input and updating file linuxdev Linux - Newbie 1 02-24-2004 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration