Then .output
in the sqlite should work too.
Ok. Perhaps database is unrecoverable. Then I would suggest to create an empty one:
- Stop the storagenode
- remove the
bandwidth.db
- execute with sqlite3 container:
sqlite3 /storage/bandwidth.db
CREATE TABLE bandwidth_usage (
satellite_id BLOB NOT NULL,
action INTEGER NOT NULL,
amount BIGINT NOT NULL,
created_at TIMESTAMP NOT NULL
);
CREATE INDEX idx_bandwidth_usage_satellite ON bandwidth_usage(satellite_id);
CREATE INDEX idx_bandwidth_usage_created ON bandwidth_usage(created_at);
CREATE TABLE bandwidth_usage_rollups (
interval_start TIMESTAMP NOT NULL,
satellite_id BLOB NOT NULL,
action INTEGER NOT NULL,
amount BIGINT NOT NULL,
PRIMARY KEY ( interval_start, satellite_id, action )
);
.exit
- Start the storagenode
- Check your dashboard