mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-10 09:21:44 -04:00
create: also archive inode number, fixes #8362
we could use this if we use the "previous archive" instead of the "files cache" to determine whether a file is unchanged.
This commit is contained in:
parent
e4b5a59be0
commit
ae4abdfe1c
4 changed files with 9 additions and 1 deletions
|
|
@ -1058,6 +1058,8 @@ class MetadataCollector:
|
|||
group = gid2group(st.st_gid)
|
||||
if group is not None:
|
||||
attrs["group"] = group
|
||||
if st.st_ino > 0:
|
||||
attrs["inode"] = st.st_ino
|
||||
return attrs
|
||||
|
||||
def stat_ext_attrs(self, st, path, fd=None):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# this set must be kept complete, otherwise the RobustUnpacker might malfunction:
|
||||
# fmt: off
|
||||
ITEM_KEYS = frozenset(['path', 'source', 'target', 'rdev', 'chunks', 'chunks_healthy', 'hardlink_master', 'hlid',
|
||||
'mode', 'user', 'group', 'uid', 'gid', 'mtime', 'atime', 'ctime', 'birthtime', 'size',
|
||||
'mode', 'user', 'group', 'uid', 'gid', 'mtime', 'atime', 'ctime', 'birthtime', 'size', 'inode',
|
||||
'xattrs', 'bsdflags', 'acl_nfs4', 'acl_access', 'acl_default', 'acl_extended',
|
||||
'part'])
|
||||
# fmt: on
|
||||
|
|
|
|||
|
|
@ -209,6 +209,10 @@ class Item(PropDict):
|
|||
@nlink.setter
|
||||
def nlink(self, val: int) -> None: ...
|
||||
@property
|
||||
def inode(self) -> int: ...
|
||||
@inode.setter
|
||||
def inode(self, val: int) -> None: ...
|
||||
@property
|
||||
def size(self) -> int: ...
|
||||
@size.setter
|
||||
def size(self, val: int) -> None: ...
|
||||
|
|
|
|||
|
|
@ -288,6 +288,8 @@ cdef class Item(PropDict):
|
|||
# size is only present for items with a chunk list and then it is sum(chunk_sizes)
|
||||
size = PropDictProperty(int)
|
||||
|
||||
inode = PropDictProperty(int)
|
||||
|
||||
hlid = PropDictProperty(bytes) # hard link id: same value means same hard link.
|
||||
hardlink_master = PropDictProperty(bool) # legacy
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue