The last access date/time of an NTFS file is only updated if the file is
backed up, it isn't updated
during incremental backup scan processing.

Most virus protection software modifies the last access while scanning the
file system for viruses but
resets it to the original value unconditionally.

The TSM backup client currently doesn't reset the last access time but
development is considering
adding an option to allow it to be reset to the original value prior to
backup.

The attached program will dump out the time stamps of an ntfs file.

Running this program against an ntfs file before and after backing up the
file should
demonstrate the last access date changing.

Hope this helps .....

Pete



----------------------------------------------------------------------------------------------------------------------------------------------------------------
#include <windows.h>
#include <stdio.h>

static TCHAR * getLocalTimestamp (FILETIME *ftP, TCHAR *buff);

void wmain (int argc, wchar_t *argv[])
{
   WIN32_FIND_DATA fd;
   HANDLE          hFind;

   TCHAR           buff[100];

   if (argc < 1)
      return;

   if ( (hFind=FindFirstFile(argv[1], &fd)) == INVALID_HANDLE_VALUE )
   {
      wprintf(L"\n\nFindFirstFile: Win32 RC=%d.\n\n", GetLastError());
      return;
   }
   FindClose(hFind);

   wprintf(L"\n%s :\n", argv[1]);
   wprintf(L"   Creation    Time: %s\n"   , getLocalTimestamp
(&(fd.ftCreationTime), buff));
   wprintf(L"   Last Access Time: %s\n"   , getLocalTimestamp
(&(fd.ftLastAccessTime), buff));
   wprintf(L"   Last Write  Time: %s\n\n"   , getLocalTimestamp
(&(fd.ftLastWriteTime), buff));

   return;
}


static TCHAR * getLocalTimestamp (FILETIME *ftP, TCHAR *buff)
{
   FILETIME        ftLocal;
   SYSTEMTIME      stLocal;

   FileTimeToLocalFileTime(ftP, &ftLocal);
   FileTimeToSystemTime(&ftLocal, &stLocal);

   wsprintf(buff, L"%04d %02d/%02d %02d:%02d:%02d:%03d",
           stLocal.wYear, stLocal.wMonth, stLocal.wDay, stLocal.wHour,
           stLocal.wMinute, stLocal.wSecond, stLocal.wMilliseconds);

   return buff;
}
-----------------------------------------------------------------------------------------------------------------------------------------------




Pete Tanenhaus
Tivoli Storage Solutions Software Development
email: [EMAIL PROTECTED]
tieline: 320.8778, external: 607.754.4213

"Those who refuse to challenge authority are condemned to conform to it"

---------------------- Forwarded by Pete Tanenhaus/San Jose/IBM on
03/27/2002 03:03 PM ---------------------------

Alex Paschal <[EMAIL PROTECTED]>@VM.MARIST.EDU> on 03/27/2002
01:54:02 PM

Please respond to "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>

Sent by:    "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>


To:    [EMAIL PROTECTED]
cc:
Subject:    Re: Windows NTFS last accessed date set by TSM client



Andy,

What exactly is the issue?  Personally, during my testing, it looked like
the TSM client maintained the last access date and NTFS didn't
automatically
update the Last Access date as you describe when TSM accessed the file (on
WinNT4 SP6, I think).  The updated access time issues I encountered had to
do with interoperability with the McAfee virus scan software.  Here is the
message I posted with one of my actual tests copied and pasted in it.
http://msgs.adsm.org/cgi-bin/get/adsm0109/460.html

I believe your statement that NTFS updates the Access Date when TSM access
the file possibly occurs under situations I didn't test.  Could you give us
more detail?


Thanks,
Alex Paschal
Storage Administrator
Freightliner, LLC
(503) 745-6850 phone/vmail

-----Original Message-----
From: Andrew Raibeck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 4:32 PM
To: [EMAIL PROTECTED]
Subject: Re: Windows NTFS last accessed date set by TSM client


This is a known issue, and we are working on a solution.

For what it is worth, TSM does not *actively* change the last access date;
this is a property of how the file system works, that any application that
touches a file will update the last access date. Applications that don't
"change" the last access date are almost certainly implicitly changing it
when they touch the file, but then resetting it when they are done. As I
mentioned above, we are working on resolving this ourselves.

For now, there isn't anything that can really be done about this. However,
TSM should normally only be touching files that have actually changed
(assuming that you do regular incremental backups). If that is the case,
then it can be assumed that if TSM is backing it up, it must have been
changed, and thus accessed by some other application; so it would not be
subject to your purge by last access date rule, anyway.

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: [EMAIL PROTECTED]

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




Allan Kelly <[EMAIL PROTECTED]>
Sent by: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
03/26/2002 16:20
Please respond to "ADSM: Dist Stor Manager"


        To:     [EMAIL PROTECTED]
        cc:
        Subject:        Windows NTFS last accessed date set by TSM client



We have a couple of Windows file servers that we back up with the TSM
Windows client 4.1.2.14 to our TSM Windows 4.1.3.0 server.  The file last
accessed date is set during the scheduled backup run and we do not know
how
to stop it.  We want to run purges based on the last accessed date but we
are stymied.

Any useful suggestion are most urgently needed.

Thanks.

Allan Kelly.

Reply via email to