Browse Source

Fix BackupService crashing when an attachment is missing (#11241)

* Fix BackupService crashing when an attachment is missing

For various reasons such as admin error or out-of-sync media and
database backups, it might be possible for local attachments to be lost.

This commit allows the BackupService to continue its work even if some media
file is missing.

* Change error message
pull/4/head
ThibG 4 years ago
committed by Eugen Rochko
parent
commit
87c1ad4ea3
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      app/services/backup_service.rb

+ 2
- 0
app/services/backup_service.rb View File

@ -142,5 +142,7 @@ class BackupService < BaseService
io.write(buffer)
end
end
rescue Errno::ENOENT
Rails.logger.warn "Could not backup file #{filename}: file not found"
end
end

Loading…
Cancel
Save