Here are some useful commands while operating things:
There is a script we have for bootstrapping a new Spindexer node. We recommend running on a fresh Ubuntu setup with at least 20GB disk space and 4GB RAM.
curl -o- https://raw.githubusercontent.com/spinamp/spindexer/main/instance_install_script | bash
From there, just modify your .env file to configure it as needed, and you're good to go!
Save the database backup:
yarn save-db
Drop the database:
yarn connect-db-root
and then
drop database web3_music_pipeline;
Restore the database:
yarn restore-db
-- Clear all erc721nfts where there was an error with their metadata or processing them into tracks so they can be tried again:
select * from raw_nft_process_errors;
delete from raw_nft_process_errors;
-- Clear all ipfs upload errors so they can be tried again:
delete from raw_ipfs_files where error is not null;
-- Clear all noizd nfts:
delete from processors where id='createNFTsFromERC721Transfers_0xf5819e27b9bad9f97c177bf007c1f96f26d91ca6';
delete from erc721nfts where id like '%0xf5819e27b9bad9f97c177bf007c1f96f26d91ca6%';
-- Clear all tables except nfts:
delete from raw_processed_tracks;
delete from raw_artist_profiles;
delete from raw_artists;
delete from raw_processors where id in ('stripIgnoredNFTs','createProcessedTracksFromAPI_noizd');
--- Example: Update a bunch of deeply nested entries in records in a table:
update raw_nft_factories
set "typeMetadata" =
jsonb_set(
"typeMetadata", '{overrides,artist, "artistId"}',
format(
'"ethereum/%s"',
lower("typeMetadata"->'overrides'->'artist'->>'artistId')
)::jsonb
)
where "platformId"='zora';