2018-10-04 21:04:31 +01:00
<div class="view-customize">
2018-10-12 17:54:15 +01:00
<div class="backup-restore">
<div class="backup-zone">
{{ # if session .isGlobalAdmin }}
2018-10-17 14:27:40 +01:00
<p>
2021-11-03 11:46:20 -04:00
Documize Community is a multi-tenanted application enabling both "tech.mycompany.com" and "sales.mycompany.com" to run using the same executable/database.
As a Documize Community <b>Global Administrator</b>, you will be performing a complete system-wide backup across all tenants.
The Documize Community <b>Tenant Administrator</b> can login to perform a tenant-level backup (e.g. marketing.mycompany.com).
2018-10-17 14:27:40 +01:00
</p>
{{ else }}
<p>
2021-11-03 11:46:20 -04:00
Documize Community is a multi-tenanted application enabling both "tech.mycompany.com" and "sales.mycompany.com" to run using the same executable/database.
A Documize Community <b>Global Administrator</b>, you will be performing a complete system-wide backup across all tenants.
As a Documize Community <b>Tenant Administrator</b> you can perform a tenant-level backup (e.g. marketing.mycompany.com).
2018-10-17 14:27:40 +01:00
</p>
2018-10-12 17:54:15 +01:00
{{ / if }}
2018-10-17 14:27:40 +01:00
<p>It can take <b>several minutes</b> to complete the backup process — please be patient while the backup operation is in progress.</p>
2018-10-12 17:54:15 +01:00
<div class="margin-top-30 margin-bottom-20">
{{ # ui / ui-checkbox selected = backupSpec .retain }}
Retain backup file on server
{{ / ui / ui-checkbox }}
</div>
2018-10-17 14:27:40 +01:00
{{ # if backupRunning }}
<h3 class="text-success">Backup running, please wait...</h3>
{{ else }}
2018-12-14 11:52:31 +00:00
{{ ui / ui-button color = constants .Color .Yellow light = true icon = constants .Icon .Database label = ( concat "BACKUP TENANT (" appMeta .appHost ")" ) onClick = ( action "onBackup" ) }}
2018-10-17 14:27:40 +01:00
{{ # if session .isGlobalAdmin }}
2018-12-13 12:24:16 +00:00
{{ ui / ui-button-gap }}
2018-12-14 11:52:31 +00:00
{{ ui / ui-button color = constants .Color .Yellow light = true icon = constants .Icon .Database label = "BACKUP SYSTEM" onClick = ( action "onSystemBackup" ) }}
2018-10-17 14:27:40 +01:00
{{ / if }}
{{ / if }}
2018-10-12 17:54:15 +01:00
{{ # if backupFailed }}
<div class="backup-fail">Backup failed — please check server logs</div>
{{ / if }}
{{ # if backupSuccess }}
<div class="backup-success">Backup successful ( {{ backupFilename }} )</div>
{{ / if }}
2018-10-04 21:04:31 +01:00
</div>
2018-10-12 17:54:15 +01:00
</div>
<div class="backup-restore">
<div class="restore-zone">
{{ # if session .isGlobalAdmin }}
2021-11-03 11:46:20 -04:00
<p>Restore from a <b>system backup</b> should only be performed on an <b>empty Documize Community database.</b></p>
2018-10-12 17:54:15 +01:00
{{ / if }}
2018-10-17 14:27:40 +01:00
<p>Restore operation will <b>re-create</b> users, groups, permissions, spaces, categories and content.</p>
<p>It can take <b>several minutes</b> to complete the restore process — please be patient while the restore operation is in progress.</p>
2018-10-12 17:54:15 +01:00
<div class="margin-top-30 margin-bottom-20">
<div class="custom-file">
2018-12-08 20:54:19 +00:00
<input type="file" class="custom-file-input" id="restore-file" accept="application/zip" multiple="false" onchange= {{ action "upload" }} >
2018-10-12 17:54:15 +01:00
<label class="custom-file-label" for="restore-file">Choose backup file</label>
</div>
<div class="margin-top-20"></div>
</div>
{{ # if restoreFailed }}
<div class="restore-fail">Restore failed — please check server logs</div>
{{ else if restoreSuccess }}
<div class="restore-success">Restore completed — restart your browser and log in</div>
{{ else }}
{{ # if restoreUploadReady }}
2018-12-14 11:52:31 +00:00
{{ ui / ui-button color = constants .Color .Red light = false icon = constants .Icon .Database label = restoreButtonLabel onClick = ( action "onShowRestoreModal" ) }}
2018-10-12 17:54:15 +01:00
{{ / if }}
{{ / if }}
</div>
</div>
2018-10-15 18:59:21 +01:00
</div>
2018-10-10 15:13:09 +01:00
2018-10-15 18:59:21 +01:00
<div id="confirm-restore-modal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">Confirm Restore</div>
<div class="modal-body">
2018-12-08 20:54:19 +00:00
<form onsubmit= {{ action "onRestore" }} >
2018-10-15 18:59:21 +01:00
<div class="form-group">
<label for="delete-space-name">Please type RESTORE to commence the process</label>
2018-12-08 20:54:19 +00:00
{{ in put type = "text" id = "confirm-restore" class = "form-control mousetrap" placeholder = "Please type RESTORE" value = confirmRestore }}
2021-11-03 11:46:20 -04:00
<small class="form-text text-muted">You should only restore to an empty Documize Community instance</small>
2018-10-15 18:59:21 +01:00
</div>
</form>
</div>
<div class="modal-footer">
2022-03-01 22:03:18 -05:00
{{ ui / ui-button color = constants .Color .Gray light = true label = ( localize 'cancel' ) dismiss = true }}
2018-12-13 12:24:16 +00:00
{{ ui / ui-button-gap }}
{{ ui / ui-button color = constants .Color .Red light = true label = constants .Label .Restore onClick = ( action "onRestore" ) }}
2018-10-15 18:59:21 +01:00
</div>
</div>
</div>
2021-11-03 11:46:20 -04:00
</div>