From: Dave <linux-user@nospam.dnsalias.org>
To: linux-admin@vger.kernel.org
Subject: Stupid hotplug/usb drive/timestamp question
Date: Mon, 10 Apr 2006 23:35:27 -0700 [thread overview]
Message-ID: <200604102335.30008.linux-user@nospam.dnsalias.org> (raw)
Hopefully somebody can give me a shortcut to the answer to my problem, as I'm
a bit overwhelmed trying to read up on udev, hotplug, usbfs, HAL, fstab-sync,
etc.
I recently got an external, USB-connected box for an IDE drive, which I'm now
using as my backup drive with a script derived from Mike Rubel's rsync
snapshots (http://mikerubel.org/computers/rsync_snapshots/index.html).
Briefly, it uses mv to rename daily.(n) to daily.(n+1) for all n from 0 to
the highest existing, uses cp to make a hardlink copy from daily.1 to
daily.0, and then uses rsync to update only changed files in daily.1.
It worked fine when the destination was on an internal drive, i.e. connected
to the mobo IDE controller. "ls -l" showed each numbered backup folder
(daily.0, daily.1, daily.2, etc...) with timestamp it was created, no matter
how many times it was moved up from daily.n to daily.n+1.
Now that I'm using the USB drive, it seems each time a folder is renamed, the
timestamp changes to the current time. This makes it a tad difficult to know
how old each backup is when they all have the same timestamp, from when the
script last ran.
I did a quick check, and for a filesystem mounted on /dev/hda3 (my root
filesystem) "mv oldname newname" preserves attributes, including timestamp.
On the usb drive, "mv oldname newname" changes the timestamp.
Why? And how do I fix this? The mountpoint is dynamically created
in /etc/fstab when the usb drive is turned on; currently it looks like
/dev/sda1 /media/backups ext2 pamconsole,exec,noauto,managed 0 0
All I want is for ls -l to show each folder with the correct timestamp. I
know that each folder is a day older than the previous ... but it's the
principle. Plus, once I get this debugged, I'm going to share the drive
read-only for my wife via Samba, so she can restore her own files when she
accidentally deletes something
reply other threads:[~2006-04-11 6:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200604102335.30008.linux-user@nospam.dnsalias.org \
--to=linux-user@nospam.dnsalias.org \
--cc=linux-admin@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).