2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-10-02 00:01:53 -04:00
|
|
|
require "backup_restore"
|
2014-03-12 13:26:51 -04:00
|
|
|
|
|
|
|
module Jobs
|
2019-10-02 00:01:53 -04:00
|
|
|
class CreateBackup < ::Jobs::Base
|
2014-03-12 13:26:51 -04:00
|
|
|
sidekiq_options retry: false
|
|
|
|
|
|
|
|
def execute(args)
|
2017-12-20 17:00:23 -05:00
|
|
|
BackupRestore.backup!(
|
|
|
|
Discourse.system_user.id,
|
|
|
|
publish_to_message_bus: false,
|
|
|
|
with_uploads: SiteSetting.backup_with_uploads,
|
|
|
|
fork: false,
|
|
|
|
)
|
2014-03-12 13:26:51 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|