Unsure of backup logic in this situation
-
Happy New Year all.
I had a disk failure over Christmas on my Cloudron homeserver and so an app (Mastodon) hosted on there went down for a few weeks. Not a big problem, just social media.
I'd like to restore from a 3 week old backup but then combine it with the most recent backup but am unsure of what to expect.
Here's a summary of the situation:
-
mastodon app Data Directory hosted on volume (external USB harddisk) in /mastodon subdirectory
-
app Data Directory was being updated nightly to separate backup harddisk
-
last good app backup was 20231205-mastodon
-
some issue with USB harddisk caused it to be unmounted
-
tried to remount but didn't work
-
app wasn't responding in cloudron so couldn't do nightly backup
-
3 weeks pass
-
finally got home and remounted disk, this time remapped it as ext4 volume from within Cloudon volumes UI
When I tried to restart it it couldn't as disk mount location had changed (directory not empty message in Volumes UI)
- I decided to change the directory to mastodon-240108
App restarts with minimal data (app size went from ~25Gb down to ~2Gb) - as expected.
-
app working. Some issues with user 2FA but these are now fixed.
-
restarted nightly backups. Most recent 20240108-mastodon.
Question:
From the backup files I have available, I'd like to get back to the app state from 20231205-mastodon, and then preserve all activity from backup 20240108-mastodon to current.Is this possible?
I don't know if the following will achieve this:
- restore the 20231205-mastodon into the new mastodon app directory located in mastodon-240108
- take backup
- restore from 20240108-mastodon
Any suggestions or help greatly appreciated.
-
-
You wont be able to merge both backups as such. If you restore the app with the older backup then everything will get replaced data wise, there is no merging as such.
So I would recommend to restore the old backup and mastodon would catch up with content from external instances, of course your personal toots and such will be gone and you may have to add those manually if this is relevant.
-
I don't think there is any backup option out there which can do what you are hoping can be done. The one exception is if you are manually extracting the data to be restored, and putting them in different locations. I just say this so you don't go feeling like this is some sort of weakness of Cloudron. Backups rely on timestamps and exact conditions. You couldn't restore the second backup because it would look for the time slot from which it was built, in the records, and those records aren't going to be in the currently restored backup. But if it is the media you want, then the fact you do have separate sets of backups does mean you can at least navigate through the backup and find that media, and then as @nebulon said, manually add them back to your Mastodon. But I gotta say, why do you need to have this media? I mean, Mastodon IS social media, and it's meant to be ephemeral. If there is some info you like, then screenshot it, or click the link and bookmark it, print it out to PDF, or follow the poster (to then check them out post-restore to see that specific post) etc. But saving it and keeping it to be viewable only within your Mastodon seems like a use even Mastodon wasn't really meant for.
Anyway, good to hear you are back up and running. Hope the new year remains happier. I'm @shane@social.futurnumerique.com if you want to expand your follow/followers!
-
-