Can you confirm if other contents, like plugins and themes, are missing as well just like the pots and pages?
Also, please check if the media files remain there.
the plugins, themes and media are still there
my host told me they erased my database but in my ftp i can still see all my files
Please ask them if they can provide you a database backup, that’s quite crucial.
All the relevant data about posts and pages are stored directly in the database.
the database backup they say doesn’t have it. So how can I have media files but not pages and posts in my database?
The media files, plugins and themes are stored within your FTP files.
Pages and posts are stored in the database.
You can see it more detailed in the Codex(official WordPress wiki).
This article shows the database description and each table’s function:
https://codex.ww.wp.xz.cn/Database_Description#Table_Overview
Also if you google the query: ‘where are the posts and pages stored in WordPress?’, you’ll see many results explaining it.
So, just to summarize where each item is stored:
-Posts > database
-Pages > database
-Media files > FTP
-Plugins > FTP
-Themes > FTP