In the last episode (Jul 15), David Bear said:
> I'd like to run tar using a data incremental.  For example, if I run
> tar today like this:
>   tar cvf /dev/nsa0 /home > home.catalog
> 
> I end up with a listing of all files tarr'ed in home.catalog.  Then
> the next day I'd like to run tar but only have tar select files that
> were changed since home.catalog was written.  Tar has --newer DATE
> option but I would like to set the DATE according to the last
> modified time of the home.catalog.
> 
> So, question 1 is how do I get the last mod date of a file?  

>From the tar infopage:

`--newer=DATE'
`--after-date=DATE'
`-N'
     When creating an archive, `tar' will only add files that have
     changed since DATE.  If DATE begins with `/' or `.', it is taken
     to be the name of a file whose last-modified time specifies the
     date.

> Question 2 is, is there a better way that I'm missing?

What I did when I used tar for backups was to use the
listed-incremental option, which tells tar to create a list of
filenames and timestamps, and on subsequent runs, only back up files
that differ from the listfile.  Worked very well.  To do a full backup,
just delete the listfile before running tar.

-- 
        Dan Nelson
        [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to