* Could btrfs-restore be extended to also restore file dates?
@ 2012-05-22 21:42 Henry Bakker
2012-05-23 9:07 ` David Sterba
0 siblings, 1 reply; 3+ messages in thread
From: Henry Bakker @ 2012-05-22 21:42 UTC (permalink / raw)
To: linux-btrfs
Any possibility of getting btrfs-restore to also restore the files
timestamp?
I'm doing a restore right now as I had one btrfs partition blow up and
I'm noting that the timestamps are marking all the restored files as
new. It would be nice to be able to do a quick compare of file dates to
determine any changed files that may be newer on the restore vs the
backup. (I can save full file compares for when the server is not being
actively used.)
I do realize it is possible that there could be other issues, but for
quickly determining potential issues this could be useful.
I do realize that there may be technical reasons for the current
behavior, so at the very least this is suggestion for future
functionality even if it doesn't help me.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Could btrfs-restore be extended to also restore file dates?
2012-05-22 21:42 Could btrfs-restore be extended to also restore file dates? Henry Bakker
@ 2012-05-23 9:07 ` David Sterba
2012-05-23 14:13 ` Henry Bakker
0 siblings, 1 reply; 3+ messages in thread
From: David Sterba @ 2012-05-23 9:07 UTC (permalink / raw)
To: Henry Bakker; +Cc: linux-btrfs
On Tue, May 22, 2012 at 03:42:05PM -0600, Henry Bakker wrote:
> Any possibility of getting btrfs-restore to also restore the files
> timestamp?
Quick look, yes it is possible and quite straightforward. The function
restore.c:copy_file has direct access to the found on-disk inode item
and can access the time fileds, then simply setting them for the file.
Maybe it could restore more, like uid, gid or mode.
david
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Could btrfs-restore be extended to also restore file dates?
2012-05-23 9:07 ` David Sterba
@ 2012-05-23 14:13 ` Henry Bakker
0 siblings, 0 replies; 3+ messages in thread
From: Henry Bakker @ 2012-05-23 14:13 UTC (permalink / raw)
To: linux-btrfs
I'm sure restoring all those fields would be functionality that most
server admins would want. If anyone on this list can add it, then you
have my thanks.
On 5/23/2012 3:07 AM, David Sterba wrote:
> On Tue, May 22, 2012 at 03:42:05PM -0600, Henry Bakker wrote:
>> Any possibility of getting btrfs-restore to also restore the files
>> timestamp?
>
> Quick look, yes it is possible and quite straightforward. The function
> restore.c:copy_file has direct access to the found on-disk inode item
> and can access the time fileds, then simply setting them for the file.
> Maybe it could restore more, like uid, gid or mode.
>
>
> david
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-23 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22 21:42 Could btrfs-restore be extended to also restore file dates? Henry Bakker
2012-05-23 9:07 ` David Sterba
2012-05-23 14:13 ` Henry Bakker
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).