Backups for the multisite instances are being stored in the bucket root, but not showing up in the list in the UX. Backups for the main site are stored under default as expected. This means that backups are invisible from restore and not pruned according to settings.
The multisite stanza looks ike this:
site:
adapter: postgresql
database: site
pool: 25
timeout: 5000
host: data
password: secret
host_names:
- community.site.org
Could it be that if DISCOURE_USE_S3 isnt’ set that backups end up in the wrong place? (I tried setting use_s3 in discourse.conf, but didn’t restart unicorn, but instead ran a command line backup and it still stuck it in the root, not in the name of the sub-site).
There was some issue with uploads on S3 (bucket misconfiguration, perhaps), so S3 is for backups only.
One of the multisite sites is correctly putting its uploadsbackups in the correct directory, but two aren’t.
The ones that are not going the right place had databases restored from a single-site instance, so my guess is that there is something in the database that is forcing the backup to go in the root of the backup folder rather than the site name (or default for the default site).
@gerhard sorry to bother you, but would you mind giving this a quick look to see if there’s something glaringly silly that I’m overlooking?
As I (corretly) said earlier this instance is (currently?) using S3 for backups only and not uploads.
It’s the backups for 2 of 3 sub-sites that are being put in the root of the backup bucket. The primary site is pushing them to default as expected, and one of the multisite instances is pushing them to th e sitename directory.
I mean that making a backup from either the web interface or the rake task for two of the 3 multisite hosts (that were both migrated from another server) uploads the backup to the root of the backup s3 bucket rather than into sitename/backupname.
It seems bizarre to me too.
I’ll try adding some puts to those functions to see if I can track it down.
I think that I did puts the source_path and it had the correct full path in the OS, but when it gets uploaded to S3, the sitename is no longer in the path.
I’ll look more closely again next week. The backups are there, they just aren’t where Discourse will find them.