Have you tried:
- deactivating all plugins (yes, all) to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s). If you can't get into your admin dashboard, try resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.
- switching to the Twenty Eleven theme to rule out any theme-specific problems.
And is it possible to save all my posts and reinstall wordpress and import the posts?
Yes, all the posts are in the database.