Because if the database doesn’t exist, the sqlite3 will create an empty one, and of course it will not being corrupted
In you command the sqlite3 did exactly that - it created an empty database in your installation dir and successfully checked it
To see, where your databases, you should check the storage folder
dir X:\storagenode
In the Windows GUI installation the databases are placed in the storage location.
Replace X:\storagenode or X:\storagenode\storage to your path
“File is not a database” can’t be fixed by article for malformed database
Stop the storagenode
Remove orders.db file
Execute
sqlite3 orders.db
CREATE TABLE unsent_order (
satellite_id BLOB NOT NULL,
serial_number BLOB NOT NULL,
order_limit_serialized BLOB NOT NULL, -- serialized pb.OrderLimit
order_serialized BLOB NOT NULL, -- serialized pb.Order
order_limit_expiration TIMESTAMP NOT NULL, -- when is the deadline for sending it
uplink_cert_id INTEGER NOT NULL,
FOREIGN KEY(uplink_cert_id) REFERENCES certificate(cert_id)
);
CREATE TABLE order_archive_ (
satellite_id BLOB NOT NULL,
serial_number BLOB NOT NULL,
order_limit_serialized BLOB NOT NULL,
order_serialized BLOB NOT NULL,
uplink_cert_id INTEGER NOT NULL,
status INTEGER NOT NULL,
archived_at TIMESTAMP NOT NULL,
FOREIGN KEY(uplink_cert_id) REFERENCES certificate(cert_id)
);
CREATE UNIQUE INDEX idx_orders ON unsent_order(satellite_id, serial_number);
CREATE TABLE versions (version int, commited_at text);
CREATE INDEX idx_order_archived_at ON order_archive_(archived_at);
.exit
Hi Alexey. i think i have this same problem - my node wont start and i dont have the orders.db file anywhere - but i dont really understand the command and how to excecute it? whould it still work today?
No, it will not. Especially after the orders.db DB were converted to a plain text files more than a year ago.
Your storage must not be in %AppData% by the way, looks like you looking into a wrong location. It likely were created by wrongly issued setup command from the command line - without specify the config location, identity location and at least a storage location.
The setup step usually performed when you install storagenode with installation wizard.
yea i used the “program” to run my first node. ¨
But when i launch from the “correct” folder the node runs just fine - has been for 8 hours now. But it will not start automatically with windows.
I think we solved an issue with service not starting here:
And now only cleanup. You can remove this %AppData%\Storj\Storagenode folder If you merged blobs folder to the blobs folder in the correct location, and the orders folder to the orders folder in your installation location (by default it’s "C:\Program Files\Storj\Storage Node\"), but you seems installed it to the "C:\Storj", so the orders folder should be there.
Just do not overwrite existing files during the merge, thus only new files will be added to the correct location.
This should prevent from disqualification for losing a new pieces while your node were running with a wrong config file.