class AdminBackup
Presents a simple interface to allow for backup and restore
The following functions are implemented: do_backup - call Binaries/backup to save files in data, Exas
and Diplomas do_restore - re-starts Gestion which will restore the backupped data upload_backup - send a backup-file to the server download_backup - get a backup-file from the server
Public Instance Methods
layout()
click to toggle source
# File Views/Admin/Backup.rb, line 10 def layout @order = 200 @update = true gui_hbox :nogroup do gui_vbox do show_list_single :backups, 'View.AdminBackup.list_backups', :width => 400 show_upload :upload_backup, callback: true show_button :do_backup, :do_restore, :do_download end gui_window :status do show_html :txt show_button :restore, :close end end end
list_backups()
click to toggle source
# File Views/Admin/Backup.rb, line 88 def list_backups System.run_str('ls Backups').split("\n").sort { |a, b| b <=> a } end
rpc_update(session)
click to toggle source
# File Views/Admin/Backup.rb, line 28 def rpc_update(session) reply(:update, upload_backup: 'Upload backup') end