Results 1 to 5 of 5

Thread: Samba Timestamp

  1. #1

    Samba Timestamp

    Hi,

    I'm using a USB disk to mirror a folder of my harddisk. First, I sync with the USB disk plugged in locally (to my desktop): everything works fine, and the timestamp of both files (local and mirror) is the same. But when the USB disk is plugged to Asus Router, there is time offset of 1 hour between the local file and the USB disk file (USB disk file is +1hour). Both desktop and router are set for the same timezone ("GMT: Lisbon" aka "GMT0BST,M3.5.0/1,M10.5.0"), and the offset does not occur if I plug the USB disk back to my desktop. This issue occurs both in Oleg's (1.9.2.7-d from 2010.11.27) and Official (3.0.4.4) firmware.

    Thanks in advance for your help.

  2. #2
    Most likely, this is problem with the Windows OS running on the client side. Samba time is accurate, Windows isn't due to daylight time changes. More details here:

    http://samba.anu.edu.au/rsync/daylight-savings.html

    Workarounds:

    • Ignore time changes smaller than 1 hour in the sync utility (not suitable for critical applications)
    • Use a linux client with a VM or co/andLinux to sync the folders (requires extra system resources, but a lightweight Linux flavor
      can be adopted)
    • Disable DST in Windows.
    Last edited by jmfv; 03-01-2011 at 11:56.

  3. #3
    Hi

    It is not only a Windows problem, but Samba's configuration problem! Whichever Timezone is set in Asus WL-500g, the timestamp of the files reported by Samba is always the same (whereas the timestamp reported by an ssh session changes according to the timezone).

    While looking for a fix, I found this
    http://www6.uniovi.es/samba/sambafaq-3.html

    Maybe samba service is invoked before TZ is set? Can someone please help?

    Thanks

  4. #4
    Maybe install timezone utility? Just a guess..

    -ipkg update
    -ipkg install tz

    -Goto the /opt/share/zoneinfo folder and find
    your timezone location. Copy this location to the
    folder /etc/localtime. e.g.:
    cp /opt/share/zoneinfo/Europe/Amsterdam /etc/localtime

    -Open '/usr/local/.files' and add this line:
    /etc/localtime

    -To make the change permanent, save it to flash:
    flashfs save && flashfs commit && flashfs enable

    -Restart Samba

  5. #5

    Smile

    Hi avberk,

    Thank you for your reply. I will try that as soon as possible, for now I've been able to set up successfully a sync utility (unison) that is based on file contents rather than on timestamps. It runs sloooow due to the large amount of data ( and because I'm mounting remote folder locally instead of using a unison utility inside the router), but at least I can fully trust on the sync results. Next step is to learn how to compile and package unison, so that syncing becomes much faster.

    Best,

Similar Threads

  1. Internal Samba with Oleg's firmware 1.9.2.7-10
    By Garluk in forum WL-500gP Firmware Discussion
    Replies: 6
    Last Post: 30-08-2008, 08:01
  2. Samba - sharing with user rights
    By gromot in forum WL-500g Q&A
    Replies: 1
    Last Post: 08-07-2008, 20:07
  3. SAMBA 2 will not run
    By rj.2001 in forum WL-500g Q&A
    Replies: 9
    Last Post: 15-08-2007, 11:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •