LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   wget mystery: timestamps are off by a day... (https://www.linuxquestions.org/questions/linux-software-2/wget-mystery-timestamps-are-off-by-a-day-821477/)

deej 07-22-2010 07:22 AM

wget mystery: timestamps are off by a day...
 
Hi all,

Quick intro: I have 2 Linux based NASses: a Thecus N5200 Pro (the old one) and a QNAP TS-859 PRO (the new one). The QNAP is the main NAS and I decided to reformat the Thecus and use it as a backup means for the QNAP.

I use this script to backup between the 2 systems:

Code:

#!/bin/sh
DATE=`date +%Y%0m%0d%0k%0M%0S`

cd /raid0/data/Data/
wget -r -N -l inf -nv --output-file=mirror_$DATE.log -nH --cut-dirs=1 --ftp-user=<myuser> --ftp-password=<mypassword> ftp://192.168.1.200/Data/

chown -R nobody:smbusers *
chmod -R 664 *
chmod -R a+X *

This script is run on the Thecus and it fetches changed content from the QNAP (192.168.1.200).

Now here's the mystery: files downloaded to the Thecus get a timestamp that is 1 day earlier than the one on the QNAP... I thought I was seeing things so I check again and indeed, if the date of a file on the QNAP is 22/07/2010, the Thecus downloads it and timestamps it 21/07/2010. Yep, one day is gone. It consistently does this for all the files it downloads from the QNAP.

Result: every time I rerun my mirror script the entire array gets downloaded again and again and again (I have 7 TB of data I need to backup).

How can this be? Both systems have the correct time settings, they both use NTP and the timezones are correct...

I'm baffled quite frankly. Anyone has an idea to solve this (please don't say rsync or other methods, I want to first get this wget issue solved)?

deej 07-22-2010 07:52 AM

Update: it seems it's a bug of old wget versions that miscalculates the size of large files. Now I just have to find a new binary of wget since the Thecus is still on an old busybox.


All times are GMT -5. The time now is 08:26 AM.