Restore post from files not from Exporter


#1

I lost my website and was able to recover the folders. Can I restore post from an existing backup folders if a backup file from export of json does not exist?


#2

Was your Ghost install using MySQL or sqlite? If it was using sqlite, you may have a copy of the database in a .db file in /content/data. You maybe also have a backup JSON file in that folder.

If you were using MySQL and you don’t have a .json file, you’ll need a mysql dump from the server in order to restore your content.


#3

Good morning, Let me start of by saying thank you !!! :grin::clap: I allowed ghost cli to install default settings my sql . Can I just keep it simple by uploading those files mention above with the import tool within ghost admin?


#4

If you’re restoring from a JSON file that was in your /content/data file you would need to upload that file to the import tool in Ghost admin.

You will also want to make sure you copy across all the files and folders from the old /content/ folder, as that includes your images, themes and some settings.


#5

This is great ! I miss spoke earlier it is actually sql lite. Do you have docs that explain how to import sql into the current database?


#6

I was able to locate this documentation ! and dont want to corrupt the database !


#7

With SQLite, your database is just a file. So there’s no “importing” as such.

On your server, make sure ghost is stopped using ghost stop. Then copy the database file into place, and then ghost start.

You can copy all of the /content/ directory.


#8

Pardon the confusion, when I looked in the data content folder. I found this file when I opened it said Sqlite and made the assumption that the database was sqllite

But when I compare the old config.production.json and come it to the new blog configuration I see Mysql
So far I havent found a way to reinstall the old ghost site to do the mys


#9

That SQLite DB looks like it was just for dev mode, perhaps the blog got fired up in dev mode once. Doesn’t look like it contains any content.


#10

How could that be dev mode when the config file was built in production. I fired this up I digital ocean but did not use the one clock installation. These file have to be in another folder.


#11

Your production config is for MySQL. There are not going to be any SQLite DB files for production mode in any folder. The only way to restore your content would be to do a mysql dump or a Ghost export from the original server.


#12

Got it but the system crashed. All I have are the files is there a way to create a mysql dump with the files. Any suggestion is much appreciated! Cheers !


#13

That’s not something I’ve ever had to do - my best advice is to ask google :slight_smile: Maybe someone else has pointers…


#14

This was a learning curve you can close this ticket. But I got the the post back. Now the blog shows up on my device and not everyone else. Any Insight on how nginx server block may affect this.


#15



closed #16

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.