How to delete extra data created by Import Plugin - very very slow import
-
I recentrly Imported big data in one of my nodebb forum, but now it is very very very slow in importing, even after 8 GB ram and 4cpu's. I think i can make it faster if i purge all extra data created by import plugin, please note the button at bottom, "delete all changes what this plugin had made..." is not working.
-
Found the solution, importing too much topics in a single category hangs the nodebb, import some data than move it to some temporary category. Thasn import remaining data, meanwhile delete mongodb import Garbaze in using these mongo commands
db.objects.update({},{$unset: {_imported_tid:1}},{multi: true}); db.objects.update({},{$unset: {_imported_uid:1}},{multi: true}); db.objects.update({},{$unset: {_imported_cid:1}},{multi: true}); db.objects.update({},{$unset: {_imported_slug:1}},{multi: true}); db.objects.update({},{$unset: {_imported_locked:1}},{multi: true}); db.objects.update({},{$unset: {_imported_path:1}},{multi: true}); db.objects.update({},{$unset: {_imported_title:1}},{multi: true}); db.objects.update({},{$unset: {_imported_content:1}},{multi: true}); db.objects.update({},{$unset: {_imported_guest:1}},{multi: true}); db.objects.update({},{$unset: {_imported_ip:1}},{multi: true}); db.objects.update({},{$unset: {_imported_user_slug:1}},{multi: true}); db.objects.update({},{$unset: {_imported_user_path:1}},{multi: true}); db.objects.update({},{$unset: {_imported_category_path:1}},{multi: true}); db.objects.update({},{$unset: {_imported_category_slug:1}},{multi: true});
But keep in mind this will also delete the history of import will result in duplicate categories get imported or the posts, to prevent this keep writing post ids and category ids which you imported and delete them from the old database.