docker run -it --rm --mount type=bind,source=/mnt/user/Storj/storagenode/storage,destination=/data --mount type=tmpfs,destination=/ramdisk sstc/sqlite3 sh
In the instruction you will unload data to the /ramdisk folder instead of /data and load the data from it too.
However, you need to have a double size of free RAM to be able to unload and load the whole dump of database.
You should execute this instruction for each malformed database. Please, replace the bandwidth.db from the example to each such database and proceed all points.
Please, do not try to load a data from one database to all others - you will break everything. For each database the /storage/dump_all_notrans.sql should be own.
You can ignore those errors.
If you loaded the right file to the right database, then try to start the storagenode.
I don’t think i understand that quite.
I have execute the instruction for each malformed databases. When i was done with one database i deleted the dump_all_notrans.sql and continued to the next database. Tried to start the node after but it just stops right away.
could you mabye take a look over TeamVeiwer?
execute with sqlite3 (local or docker version as in the article above)
sqlite3 pieceinfo.db
CREATE TABLE pieceinfo_ (
satellite_id BLOB NOT NULL,
piece_id BLOB NOT NULL,
piece_size BIGINT NOT NULL,
piece_expiration TIMESTAMP,
order_limit BLOB NOT NULL,
uplink_piece_hash BLOB NOT NULL,
uplink_cert_id INTEGER NOT NULL,
deletion_failed_at TIMESTAMP,
piece_creation TIMESTAMP NOT NULL,
FOREIGN KEY(uplink_cert_id) REFERENCES certificate(cert_id)
);
CREATE UNIQUE INDEX pk_pieceinfo_ ON pieceinfo_(satellite_id, piece_id);
CREATE INDEX idx_pieceinfo__expiration ON pieceinfo_(piece_expiration) WHERE piece_expiration IS NOT NULL;
.exit
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