Backup failed after upgrade to 2.2.0.beta9

Hi,

We upgraded Discourse to the latest version today and received a failed backup email. I have attached the error log:

The exception message:
[2019-01-25 03:35:21] EXCEPTION: /var/www/discourse/lib/backup_restore/backuper.rb:237:in `block in create_archive': Failed to archive uploads.
tar: uploads/default/optimized/1X/b87e5cba637562a00e005839efa6319ba0e8c405_1_20x20.png: File removed before we read it
tar: uploads/default/optimized/1X/fbf98b77f0ec6bf8eb8e6bc37a1eaeeef6360efb_1_20x20.jpg: File removed before we read it

The backup ran fine manually from the console.

Can anyone help?

Regards,
Arunangshu Chatterjee

I’m just guessing here, but it sounds like the backup ran in the middle of an active data conversion process right after the upgrade. It should not happen after the conversion is complete.

Did you skip over beta8? That is when this image optimization was introduced Discourse 2.2.0.beta8 Release Notes

Image Optimization Improvements

All images uploaded to Discourse are automatically optimized to minimize their size. This not only helps sys-admins minimize the need for large storage sizes, but also decreases the data size sent to users improving page load time. Original images are not touched by this job, only the thumbnail displayed within the lightbox.

Important Note: Expect high CPU usage for a few hours after this upgrade due to image re-optimization. Sites with large numbers of images may see high CPU usage for a longer period of time.

4 Likes

That’s a likely explanation. Just try the backup again.

2 Likes

Hi @pfaffman/@ssvenn,

Thanks for helping out. I have been monitoring the backup job for a week now. Initially, when the backup failed, there were 5 backups already present(as per the policy) when the new backup from the updated forum triggered.

So I deleted a couple of them and let the regular backup job take its course. The upgrade was done after almost a year from 2.0.0 Beta 9 to 2.2.0 Beta 9 +73.

3 Likes