Backup Suggestions - Make a large flashing sign to not rename your backups

I received the message:

Failed to restore from backup because backup file was renamed

And then I found the reason in this thread:

A few suggestions from this:

  • Could you add a note to the user to not rename the backup if the name is important?

  • If there already is a note could you make it bigger and add more glitter?

  • Send out reminders once a month to run nay download a backup. Mine is old :frowning:

It’s fairly rare that someone has this problem. It’s usually pretty easy to resolve. Sending a monthly notice about something that affects virtually no one doesn’t seem very productive.

I think it’s possible to figure out what the name should be by information that’s in the archive. Maybe that’s what you really want.

I think that you might be able to restore the database by hand and then run the migration,for example.

1 Like

Yes, this query will allow @vel to reconstruct the proper filename. Load the SQL file into a new, separate database and run this query:

select max(version) from schema_migrations

Alternately, find the schema_migrations data in the SQL file and manually pick the highest number.

2 Likes

Weekly (local) backups are on by default in Discourse. Isn’t that so @pfaffman ?

1 Like

Yes. Weekly backups are the default.

This issue here was that he renamed an old backup and then couldn’t restore it the recommended way.

I also believe there’s ongoing discussion about including the metadata in a way other than the filename, allowing for file renames. But for now, renames should be avoided.

5 Likes

I was able to restore it! I followed the steps in the post at the top. I apologize that was not clear.

It was restored successfully.

1 Like

The note / email would be to the Admins to save a backup locally to their computer incase the hosting company goes down or the hosting company server goes down (taking the online backups with it).

I know it’s rare but this actually really happened. The hosting company that hosted my discourse install vanished. I lost all of the online backups. I happened to save a backup locally from October 2020. So in total I lost a few months of posts. I was able to restore that backup once the forums were setup again.