Thank you Craig!
Very clear and helpful.
Raf
Il 25/04/2020 04:06, Craig Barratt via BackupPC-users ha scritto:
In the example you showed, the file contents have
digest 4b544ad7b8992fbbc0fafe34ae6ab5d5. You can pass that directly to
BackupPC_zcat if you want, which will uncompress the file to stdout, eg:
BackupPC_zcat 4b544ad7b8992fbbc0fafe34ae6ab5d5 | wc
The pool directly tree is described in the documentation
<https://backuppc.github.io/backuppc/BackupPC.html#Storage-layout>:
For V4+, the digest is the MD5 digest of the full file contents (the
length is not used). For V4+ the pool files are stored in a 2 level
tree, using 7 bits from the top of the first two bytes of the
digest. So there are 128 directories are each level, numbered evenly
in hex from 0x00, 0x02, to 0xfe.
For example, if a file has an MD5 digest of
123456789abcdef0123456789abcdef0, the uncompressed file is stored in
__TOPDIR__/pool/12/34/123456789abcdef0123456789abcdef0.
In your example, the file will be at (assuming compression is
on): __TOPDIR__/cpool/4a/54/4b544ad7b8992fbbc0fafe34ae6ab5d5. The two
directory entries are the first two bytes (4b and 54) of the filename,
rounded down to the nearest even number (ie, 4b -> 4a, 54 -> 54).
Numerically it's anding with 0xfe.
Craig
On Fri, Apr 24, 2020 at 4:57 AM R.C. <milan...@hotmail.com
<mailto:milan...@hotmail.com>> wrote:
Il 24/04/2020 02:53, Craig Barratt via BackupPC-users ha scritto:
> The attrib file contains the meta data (mtime, permissions
etc) for all
> the files in that directory, including the md5 digest of the
contents of
> each file.
>
> You can use BackupPC_attribPrint to print the contents of the attrib
> file, which will show the meta data for each file.
>
> Craig
>
Thank you Craig.
I'm sorry I can't still figure out the right way to get to the file.
If I issue:
sudo -u backuppc /usr/share/BackupPC/bin/BackupPC_attribPrint
attrib_c5cda251876d069be82cd87feef573be |head -n 15
the first file's metadata returned is:
Attrib digest is c5cda251876d069be82cd87feef573be
$VAR1 = {
'0001E9891510415CBBFA53F685D8FF2C.Zip' => {
'compress' => 3,
'digest' => '4b544ad7b8992fbbc0fafe34ae6ab5d5',
'gid' => 0,
'inode' => 9,
'mode' => 484,
'mtime' => 1320069331,
'name' => '0001E9891510415CBBFA53F685D8FF2C.Zip',
'nlinks' => 0,
'size' => 101121,
'type' => 0,
'uid' => 0
},
How to retrieve the actual path of that file in the cpool tree?
I cannot use the digest to walk down the cpool tree. Octects lead to
non
existent path.
Using the inode to find the file is cumbersome and requires the use of
low level fs tools.
I'm referring to V4
Thank you
Raf
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
<mailto:BackupPC-users@lists.sourceforge.net>
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/