optscale
optscale copied to clipboard
is there a way to clear all the tables and run the migrations freshly in mongodb
i changed the mongod collection path to symlink due to that facing some issues like below pymongo.errors.DuplicateKeyError: E11000 duplicate key error collection: restapi.raw_expenses index
DB::Exception: Table default.expenses doesn't exist. Stack trace:
- DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits
, std::__1::allocator > const&, int, bool) @ 0x9451d1a in /usr/bin/clickhouse - DB::Exception::Exception<std::__1::basic_string<char, std::__1::char_traits
, std::__1::allocator > >(int, std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits , std::__1::allocator >&&) @ 0x9580c83 in /usr/bin/clickhouse cloud_accounts?details=true api getting failed
wanted to know is there a way to reset db and start freshly or somesolution to fix this issues
Hi @saileshsp, to clear all the tables in db, if you do not have important information on your cluster which you would like to save I recommend you to perform next steps:
- Delete cluster using runkube.py with -d flag(you can use command which you use to start the cluster and add "-d" after ./runkube.py)
- Delete /optscale folder
- Start runkube.py again like you do to start the cluster
All data bases will be cleaned and you will have new cluster