How to mass unpublish or change post status

I need to unpublish 60 posts for a period, i will then re-enable them again later. Is there a command I can run via SSH to change post status? I have tried setting up phpmyadmin on my server so I can perhaps do it via the database, maybe this is the best option? Unfortunatley I ran into errors with the install, but am still working on getting phpmyadmin working. I am not deeply technical.

Thanks,

Your best bet will be the Admin API - for every post, call post.edit with status: draft (I think)

https://ghost.org/docs/api/v3/admin/#updating-a-post

https://ghost.org/docs/api/v3/javascript/admin/

Thank you, that is a bit advanced for me technically. I think i could ultimately write a page that allows you to mass status change, but that would likely take me a whole day to create with my skill level. Time i dont have right now.

Question: can I not download the json export, edit all the post statuses, then re-upload it?

I noticed before that this might create duplicated posts? If the IDs are not changed, and only the post status is changed upon re-uploading, I would assume this does not duplicate but only changes post status? Is that correct?

I don’t think the ID is used by the importer, so it would probably create duplicate posts