@iero I’m interested in what you found in the docs that indicated an export is a proper backup strategy. Can you provide a link?
An export is not a substitute for a backup, it’s designed to move content (posts, pages, members) etc from one instance of Ghost to another but it will not include certain settings or config for security reasons and also won’t include anything where the data can grow to be quite large such as your historic member and email stats.
For a proper backup you should follow standard practice for backing up files and database content, there shouldn’t be anything Ghost specific required.
Hi Kevin, I came here with the exact question as @iero … how to (safely) pass credentials to the ghost-cli export command.
I recognize this doesn’t include the [site]/content directory so it is technically incomplete … but with this and a one-line tar command, it is super easy to create a backup that can be re-implemented with another instance of Ghost, which is what I think I want.
An export is not a backup in the traditional sense. It’s intention is to be used for migrating content, it’s not a complete copy of your database so it won’t function as a restore point in the way a backup would. Importing will also modify ids and re-render contents so again, not what you would expect from a backup/restore.
If you’re looking for a backup I suggest you look at mysqldump or similar.
I am unzipping my contents folder into the tree, and MySQL restoring the database then accessing the ghost page in chrome. When I go to /ghost and click posts and click one, I get the text but not the picture. When I unpublish, then republish, then click the little link that pops up at the bottom left, I then see the page correctly
@Jeff_Tully it’s difficult to know what’s going on there with limited details. If/when it happens you should debug what’s causing the image not to load - is it using wrong urls? is caching interfering? etc. There shouldn’t be any reason to unpublish and republish anything.
what do you think about my script above? It is the way?
@iero If it works for you and your backup/restore procedures then “it is the way” . There’s no one-size-fits-all here, it depends on how you have your self-hosted install set up and what your recovery processes look like.
Kevin I may be dealing with " unfamiliarity " on the /ghost page, under posts, it shows JUST the text, clicking the gear icon, and then the " view post " link indeed shows the complete post. I am going to assume this is proper operation
I have never looked at the page from the visitor side hahahah