Unix Technical Forum

Re: dump/restore timestamp problems, -current

This is a discussion on Re: dump/restore timestamp problems, -current within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On Mon, 11 Jun 2007, Otto Moerbeek wrote: > On Sun, 10 Jun 2007, Stuart Henderson wrote: > > ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:26 AM
Otto Moerbeek
 
Posts: n/a
Default Re: dump/restore timestamp problems, -current

On Mon, 11 Jun 2007, Otto Moerbeek wrote:

> On Sun, 10 Jun 2007, Stuart Henderson wrote:
>
> > I just tried "dump -0uf -|restore rf -" on -current (Jun 9, #270),
> > plain FFS1, and noticed that file creation times of the restored files
> > were all set to the epoch.

>
> I can reproduce that...
>
> > If I restore a dump created by older dump using a newer restore,
> > I'm seeing the file creation time restored as the current time

>
> But that not. A new restore reading an old dump restores my timestamps
> ok. Both for dirs and files.
>
> >
> > If I restore a dump created by newer dump using an older restore,
> > I'm seeing the file creation time restored as the epoch

>
> Have to try that one.
>


Try this,

-Otto

Index: traverse.c
================================================== =================
RCS file: /cvs/src/sbin/dump/traverse.c,v
retrieving revision 1.21
diff -u -p -r1.21 traverse.c
--- traverse.c 3 Jun 2007 20:16:08 -0000 1.21
+++ traverse.c 11 Jun 2007 15:40:39 -0000
@@ -480,9 +480,9 @@ dumpino(union dinode *dp, ino_t ino)
if (sblock->fs_magic == FS_UFS1_MAGIC) {
spcl.c_mode = dp->dp1.di_mode;
spcl.c_size = dp->dp1.di_size;
- spcl.c_atime = (time_t)dp->dp1.di_atime;
+ spcl.c_old_atime = (time_t)dp->dp1.di_atime;
spcl.c_atimensec = dp->dp1.di_atimensec;
- spcl.c_mtime = (time_t)dp->dp1.di_mtime;
+ spcl.c_old_mtime = (time_t)dp->dp1.di_mtime;
spcl.c_mtimensec = dp->dp1.di_mtimensec;
spcl.c_birthtime = 0;
spcl.c_birthtimensec = 0;

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:11 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com