LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Checking and changing DOS attributes on a samba mounted share (https://www.linuxquestions.org/questions/linux-software-2/checking-and-changing-dos-attributes-on-a-samba-mounted-share-477092/)

nkendrick 08-24-2006 06:37 PM

Checking and changing DOS attributes on a samba mounted share
 
Hi Folks,

One of my Linux boxes uses samba to mount a hard disk on an NT workstation - in effect, the mount point /shares/pd gets you to the 'C' drive on the workstation.

What I want to do is create a zip or tgz file on the linux box that contains some database files from the NT PC using a cron job.

So far so good, BUT I only need the ZIP/tgz file to contain files from 'drive c' that have changed since the last time the operation was run. The ideal way to do this would be to check the archive bit of the target files, but I cannot see how to do this from the Linux world.

In effect, I need to do the following:

If archive_bit_set(/shares/pd/$file) then
add /shares/pd/$file to zip
clear_archive_bit(/shares/pd/$file)
endif

The only other way I can nearly see how to do this is by having a baseline set of the files on the Linux server and then doing some sort of..

If Linux copy of file is different from copy on C drive then
copy the file on C over the Linux one
add copy of file to zip
endif

Any thoughts?

Many thanks

theNbomr 08-24-2006 07:47 PM

What you are asking for sounds like what I know as incremental backups. How about using smbtar -i?

--- rod.


All times are GMT -5. The time now is 03:34 PM.