backupNow.htm
1 year ago
callSupport.htm
1 year ago
deleteBackup.htm
1 year ago
downloadBackup.htm
1 year ago
downloadBackupLog.htm
1 year ago
editBackupNotes.htm
1 year ago
exportBackup.htm
1 year ago
extractBackup.htm
1 year ago
fileManager.htm
10 months ago
importBackup.htm
1 year ago
lockBackup.htm
1 year ago
manageBackupJob.htm
1 year ago
manageDestination.htm
1 year ago
manageSchedule.htm
1 year ago
quickStart.htm
1 year ago
restoreBackup.htm
1 year ago
showExtractedPath.htm
1 year ago
viewLog.htm
1 year ago
restoreBackup.htm
197 lines
| 1 | <div class="modal-header"> |
| 2 | <div class="modal-main-title"> |
| 3 | <h1 class="modal-title fs-5" id="restoreBackupLabel">{{ lang.t("Restore Backup") }}</h1> |
| 4 | </div> |
| 5 | <button type="button" class="btn-close" ng-click="cancel()" aria-label="Close"></button> |
| 6 | </div> |
| 7 | |
| 8 | <div class="modal-body fs-13"> |
| 9 | <p>{{ lang.t('Please choose your restore preferences. Based on the preferences, your task will be added to the queue for restore preparations. Once it’s ready, you can initiate the restore from the queue page.') }}</p> |
| 10 | |
| 11 | <!-- Choose destination --> |
| 12 | <div class="row mb-3 form-group" ng-if="backup.destinations.length > 1"> |
| 13 | <label for="choose_destination" class="form-label col-sm-4">{{ lang.t('Restore From') }}</label> |
| 14 | <div class="col-sm-8"> |
| 15 | <div class="list-group"> |
| 16 | <label ng-repeat="dest in backup.destinations" ng-show="!selectedDestination || dest.id === selectedDestination.id"> |
| 17 | <input |
| 18 | type="radio" |
| 19 | name="destinationRadio" |
| 20 | ng-click="selectDestination(dest)" |
| 21 | ng-checked="selectedDestination && dest.id === selectedDestination.id"> |
| 22 | {{ lang.t(dest.name || 'Unknown') }} |
| 23 | </label> |
| 24 | </div> |
| 25 | <div class="option-description mt-1" id="choose_destination"> |
| 26 | {{ lang.t('Please select the source for your backup. This determines which destination will be used to restore the backup.') }} |
| 27 | </div> |
| 28 | </div> |
| 29 | </div> |
| 30 | |
| 31 | <div ng-show="selectedDestination"> |
| 32 | |
| 33 | <!-- Backup Contains --> |
| 34 | <div class="row mb-3 form-group"> |
| 35 | <label class="form-label col-sm-4"> {{ lang.t('Backup Contains') }}</label> |
| 36 | <div class="col-sm-8">{{ backupContains(backup.contains) }}</div> |
| 37 | </div> |
| 38 | |
| 39 | <!-- Multisite Selection (Only appears if multisite has entries) --> |
| 40 | <div class="row mb-3 form-group" ng-if="multisite.length > 0"> |
| 41 | <label for="multisiteSelector" class="form-label col-sm-4"> |
| 42 | <strong>{{ lang.t("Select Site to Restore") }}</strong> |
| 43 | </label> |
| 44 | <div class="col-sm-8"> |
| 45 | <select id="multisiteSelector" |
| 46 | class="form-select" |
| 47 | ng-model="selectedSiteID" |
| 48 | ng-change="onMultisiteChange(selectedSiteID)"> |
| 49 | <option ng-repeat="site in multisite" |
| 50 | ng-value="site.id" |
| 51 | ng-selected="selectedSiteID == site.id"> |
| 52 | {{ site.domain }} - |
| 53 | {{ site.id == 1 ? lang.t('Main domain with all sites') : lang.t('Only files/db related to this site') }} </option> |
| 54 | </select> |
| 55 | |
| 56 | <div class="option-description mt-1"> |
| 57 | {{ lang.t("Select a specific site from your multisite network or restore all sites.") }} |
| 58 | </div> |
| 59 | </div> |
| 60 | </div> |
| 61 | |
| 62 | |
| 63 | <!-- Database Restore Option --> |
| 64 | <div ng-show="containsDatabase()"> |
| 65 | |
| 66 | <div class="row mb-3 form-group"> |
| 67 | <label for="database_restore" class="form-label col-sm-4"> {{ lang.t('Database Restore') }}</label> |
| 68 | <div class="col-sm-8"> |
| 69 | <select class="form-select" id="database_restore" |
| 70 | ng-model="selectedDatabaseOption" |
| 71 | ng-options="key as value for (key, value) in backup.database_options" |
| 72 | ng-class="{'is-invalid': errors.database}" |
| 73 | ng-disabled="databaseOptionReadOnly"> |
| 74 | <option value="">{{ lang.t('Select database restore option') }}</option> |
| 75 | </select> |
| 76 | |
| 77 | <div class="option-description mt-1" id="database_restore_description"> |
| 78 | {{ lang.t('Restore the entire database or exclude specific tables from the restore.') }} |
| 79 | </div> |
| 80 | <!-- Error message if not selected --> |
| 81 | <div class="invalid-feedback" ng-if="errors.database"> |
| 82 | {{ lang.t('Please select a database restore option.') }} |
| 83 | </div> |
| 84 | </div> |
| 85 | </div> |
| 86 | |
| 87 | |
| 88 | <!-- Exclude Tables Dropdown (disabled by default, enabled when selectedDatabaseOption is RESTORE_DATABASE_EXCLUDE or RESTORE_DATABASE_INCLUDE) --> |
| 89 | <div class="row mb-3 form-group" id="exclude_tables_dropdown" ng-show="backup.engine == 1"> |
| 90 | <label for="exclude_tables" class="form-label col-sm-4">{{ lang.t('Select Tables') }}</label> |
| 91 | <div class="col-sm-8"> |
| 92 | <div id="excludeTablesWrapper"> |
| 93 | |
| 94 | <!-- Placeholder Spinner --> |
| 95 | <div ng-if="loadingTables" class="text-start option-description mt-2"> |
| 96 | <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> |
| 97 | {{ lang.t('Loading tables...') }} |
| 98 | </div> |
| 99 | <select class="form-select" |
| 100 | id="exclude_tables" |
| 101 | multiple |
| 102 | ng-model="selectedTables" |
| 103 | ng-options="table for table in databaseTables.db_tables" |
| 104 | ng-show="!loadingTables" |
| 105 | ng-disabled="selectedTablesReadOnly || !(selectedDatabaseOption == consts.RESTORE_DATABASE_EXCLUDE || selectedDatabaseOption == consts.RESTORE_DATABASE_INCLUDE)"> |
| 106 | <option ng-if="databaseTables.db_tables.length == 0" disabled>{{ lang.t('No tables available') }}</option> |
| 107 | </select> |
| 108 | </div> |
| 109 | <div class="option-description mt-2" id="exclude_tables_description">{{ lang.t('Select the tables you want to exclude from the restore.') }}</div> |
| 110 | </div> |
| 111 | </div> |
| 112 | |
| 113 | </div> |
| 114 | |
| 115 | <!-- Files Restore Option --> |
| 116 | <div ng-show="containsHomeDir()"> |
| 117 | <div class="row mb-3 form-group"> |
| 118 | <label for="homedir_restore" class="form-label col-sm-4">{{ lang.t('Files Restore') }}</label> |
| 119 | <div class="col-sm-8"> |
| 120 | <select class="form-select" id="homedir_restore" |
| 121 | ng-model="selectedHomedirOption" |
| 122 | ng-options="key as value for (key, value) in backup.homedir_options" |
| 123 | ng-class="{'is-invalid': errors.homedir}" |
| 124 | ng-disabled="fileOptionReadOnly"> |
| 125 | <option value="">{{ lang.t('Select files restore option') }}</option> |
| 126 | </select> |
| 127 | |
| 128 | |
| 129 | <div class="option-description" id="files_restore_description">{{ lang.t('Restore all files or exclude specific folders from the restore.') }}</div> |
| 130 | <!-- Error message if not selected --> |
| 131 | <div class="invalid-feedback" ng-if="errors.homedir"> |
| 132 | {{ lang.t('Please select a files restore option.') }} |
| 133 | </div> |
| 134 | </div> |
| 135 | </div> |
| 136 | |
| 137 | <!-- Folders Includes/Excludes (disabled by default, enabled when selectedHomedirOption is RESTORE_FILES_EXCLUDE or RESTORE_FILES_INCLUDE) --> |
| 138 | <div class="row mb-3 form-group"> |
| 139 | <label for="homedir_user_list" class="form-label col-sm-4">{{ folderListLabel }}</label> |
| 140 | <div class="col-sm-8" ng-show="backup.engine == 1"> |
| 141 | <textarea class="form-control mw-25" id="homedir_user_list" rows="5" |
| 142 | placeholder="{{ lang.t('wp-content/uploads\n*/cache/*\n/logs/*') }}" |
| 143 | ng-model="folderList" |
| 144 | ng-disabled="fileOptionReadOnly || !(selectedHomedirOption == consts.RESTORE_FILES_EXCLUDE || selectedHomedirOption == consts.RESTORE_FILES_INCLUDE)"> |
| 145 | </textarea> |
| 146 | <div class="option-description mt-2" id="homedir_user_list_description">{{ lang.t('You can use the global wildcard * to match any folder or file name. Each entry should be placed on a new line.') }}</div> |
| 147 | </div> |
| 148 | <div class="col-sm-8" ng-show="backup.engine == 2"> |
| 149 | <button |
| 150 | class="btn btn-primary apply_btn" |
| 151 | type="button" |
| 152 | ng-click="fileBrowse(backup)" |
| 153 | ng-disabled="isFileBrowseDisabled || (selectedHomedirOption != consts.RESTORE_FILES_INCLUDE)"> |
| 154 | <span class="icon"> |
| 155 | <i class="fa-regular fa-folder-open"></i> |
| 156 | </span> |
| 157 | {{ lang.t("Select") }} |
| 158 | </button> |
| 159 | <div class="option-description" id="fff">{{ lang.t('Click to fetch backup files from the backup destination. Availability will be confirmed upon retrieval.') }}</div> |
| 160 | </div> |
| 161 | </div> |
| 162 | |
| 163 | </div> |
| 164 | |
| 165 | |
| 166 | |
| 167 | </div> <!-- ng-show="selectedDestination" --> |
| 168 | |
| 169 | </div> |
| 170 | |
| 171 | <div class="modal-footer"> |
| 172 | <button class="btn btn-secondary cancel_btn" type="button" ng-click="cancel()"> |
| 173 | <span class="icon"> |
| 174 | <i class="fa-regular fa-ban"></i> |
| 175 | </span> |
| 176 | {{ lang.t("Cancel") }} |
| 177 | </button> |
| 178 | |
| 179 | <button class="btn btn-primary apply_btn jb_button" type="button" |
| 180 | ng-click="ok()" |
| 181 | ng-disabled="loading || |
| 182 | (selectedHomedirOption == undefined && selectedDatabaseOption == undefined) || |
| 183 | (selectedHomedirOption == undefined && selectedDatabaseOption == consts.RESTORE_DATABASE_SKIP) || |
| 184 | (selectedHomedirOption == consts.RESTORE_FILES_SKIP && selectedDatabaseOption == undefined) || |
| 185 | (selectedHomedirOption == consts.RESTORE_FILES_SKIP && selectedDatabaseOption == consts.RESTORE_DATABASE_SKIP) || |
| 186 | (backup.destinations.length > 1 && !selectedDestination)"> |
| 187 | <span class="icon" ng-if="!loading"> |
| 188 | <i class="fa-regular fa-square-plus"></i> |
| 189 | </span> |
| 190 | <span ng-if="loading" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> |
| 191 | {{ lang.t(loading ? "Adding to queue..." : "Add to queue") }} |
| 192 | </button> |
| 193 | |
| 194 | |
| 195 | |
| 196 | </div> |
| 197 |