How do I go about identifying / using this (exotic?) .db file?
5
votes
1
answer
306
views
I own a Synology DS220J which I use to host a few different NFS shares / "Shared folders" (as DSM calls them), and I was snooping on some files in order to find out where the thing is storing information about them.
I found an interesting file that contains my "Shared folders" names in
/usr/syno/etc/synoshare.db
:
-shell
% strings synoshare.db
BACKUP.OLD
HOMES
BACKUP
[REDACTED STRING]
LAVORO
[REDACTED STRING]
WEB_PACKAGES
STORAGE
NETBACKUP
[REDACTED STRING]
TFTP
I copied this file over from the NAS to my local machine, and the first thing I tried to do was to interact with it as if it was an SQLite database:
-shell
% sqlite3 synoshare.db
SQLite version 3.44.0 2023-11-01 11:23:50
Enter ".help" for usage hints.
sqlite> .databases
main: /home/dev/playground/temp/synoshare.db r/w
sqlite> .tables
Error: file is not a database
Then I resorted to file -k
:
-shell
% file -k synoshare.db
synoshare.db: Berkeley DB 1.85/1.86 (Btree, version 3, native byte-order)\012- Berkeley DB 1.85/1.86 (Btree, version 3, little-endian)\012- data
file
seems convinced it's a Berkeley DB file. So I tried using db_dump
(db_dump
doesn't come with a man
page on openSUSE, so I referred to Oracle's [db_dump
man
page](https://docs.oracle.com/cd/E17276_01/html/api_reference/C/db_dump.html) , which suggests using -l
to list the databases in a file):
-shell
% db_dump -l synoshare.db
db_dump: __db_meta_setup: synoshare.db: unexpected file type or format
db_dump: open: synoshare.db: Invalid argument
What should I try next? I understand this database may be structured in some sort of proprietary format, but how likely would that be? And it appears to bear some resemblance with Berkeley DB files anyways, so perhaps I could use some trick to convert it to a proper Berkeley DB file?
Asked by kos
(4255 rep)
Oct 26, 2024, 12:59 AM
Last activity: Oct 26, 2024, 10:20 AM
Last activity: Oct 26, 2024, 10:20 AM