LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-07-2009, 11:39 PM   #1
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Rep: Reputation: 53
Backups and Timestamps


Hi everyone,

As I noted in my last thread I have a network drive and I want a script to backup only those files which have been created/modified since the last time I ran the script.

The problem is, when I run the script, almost always the timestamp comes out as 6 Sept. 2057, 7:40pm. This, of course, messes up the script and makes it dang near impossible to have the script update files in the backup. On my computer, the timestamps are accurate.

Here is my script:

Code:
#!/bin/bash
# rsync.sh


echo "Testing take 2!!!..."
rsync -vurt --progress /home/shane/test/ /media/iomegadrive/test/


echo "Complete!"
The drive in question is an Iomega Network Drive (500GB). In its web based admin utility I have set the time correctly (I have tried using a SNTP and without, and with daylight savings and without).

If I open the drive in Nautilus and create a folder or file... it comes up accurately.

Thank you so much in advance!!!
 
Old 02-08-2009, 05:06 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Dunno. As a temporary workaround, does updating based on checksum ("-c") work?
 
Old 02-08-2009, 10:00 AM   #3
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Original Poster
Rep: Reputation: 53
I just tried -c. I added that to the arguments in the code, uploaded a test document, and then I modified the document (typed a sentence into the document) and ran the script again. It did not uploaod the new version.
 
Old 02-08-2009, 12:19 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Pass -a to rsync?
 
Old 02-08-2009, 12:40 PM   #5
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Original Poster
Rep: Reputation: 53
Tried -a in place of -c no dice.
 
Old 02-08-2009, 02:18 PM   #6
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Original Poster
Rep: Reputation: 53
It seems FTP does not suffer from the same problems... would it be possible to use something similar to rsync with FTP style commands?
 
Old 02-09-2009, 12:57 AM   #7
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Original Poster
Rep: Reputation: 53
Scratch that- FTP has the same problem
 
Old 02-11-2009, 10:09 PM   #8
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Original Poster
Rep: Reputation: 53
I have fixed this problem, I will be posting a howto on how I did it.
 
Old 02-13-2009, 04:37 AM   #9
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
Quote:
Originally Posted by shane25119 View Post
I have fixed this problem, I will be posting a howto on how I did it.
Good. I'd very much like to know how you fixed this.
 
Old 02-22-2009, 09:49 PM   #10
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Original Poster
Rep: Reputation: 53
Sorry for my delayed reply here... here's the link to the howto:

http://www.linuxquestions.org/linux/...issues_with_cp

kenneho, if you have any questions PM me
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grep timestamps tekmann33 Linux - Newbie 3 08-26-2008 12:52 PM
change vfat timestamps jhwilliams Linux - General 2 09-12-2007 11:58 PM
VSFTPD and file timestamps t3___ Linux - Newbie 4 01-21-2004 02:26 PM
squid timestamps chamkila Linux - General 1 05-08-2003 08:59 AM
Timestamps Config Programming 2 04-22-2002 02:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:25 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
Open Source Consulting | Domain Registration