Hi
I’m new to Kopia. I’m trying to list the content of a backup. I’ve managed to connect to the repository, but when I try to list the content I get one of the following errors:
ERROR unable to get filesystem directory entry: error parsing root object ID: malformed content ID: “primary”: invalid content hash: encoding/hex: invalid byte: U+0072 ‘r’
root@TV:/mnt/primary/backups/Mike-PC# kopia list /primary/backups/Mike-PC
ERROR unable to get filesystem directory entry: entry not found “primary”: parent is not a directory
I’ve tried the whole path ‘/mnt/primary/backups’ I’ve tried leaving out the leading slash. I’ve tried changing to the directory with the files in and just typing the file name. Nothing works.
In the manual it specifies the command as
kopia list but nowhere is object-path defined or examples of it given.
Help would be appreciated.
Are you trying to list the snapshots in the repository or the contents of the snapshot?
You use the kopia list <snapshot ID>
and you get the ID from kopia snapshot list
So in my example you would do:
$ kopia snapshot list
nick@nick:/home/nick
2023-03-08 14:38:15 UTC kdc597d076f4ab24db1b26f5e1653ab4b 59.9 GB drwx------ files:70249 dirs:15946 (monthly-8)
Then copy the ID of the snapshot you want to list out, in my case it’s kdc597d076f4ab24db1b26f5e1653ab4b
and do
$ kopia list kdc597d076f4ab24db1b26f5e1653ab4b
Documents
Photos
Downloads
$ kopia list kdc597d076f4ab24db1b26f5e1653ab4b/Documents
doc1.doc
notes.txt
The snapshot ID replaces the root@TV:/mnt/primary/backups/Mike-PC
Woahhhh! Thank you so much! Worked like a dream and I would never have worked this out for myself.
But how do you know this? The entry for ‘list’ in common commands has:
list < object-path >
This doesn’t quite capture what you have to do. In fact, what you have to do doesn’t seem to be documented anywhere. [ edit ] Sorry it is documented but I would never have thought to use it.
I’m aware that this is open source and I am of course grateful for what looks to me like a great program (that’s why I chose it), but I’m spending hours trying to figure out how to get things to work.
Anyway thank you once again. I still haven’t worked out how to mark things as solved, but you have solved the problem.