enable tape backup by default
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
79e2473c63
commit
a21f9852fd
@ -4,12 +4,7 @@ Tape Backup
|
||||
===========
|
||||
|
||||
.. CAUTION:: Tape Backup is a technical preview feature, not meant for
|
||||
production use. To enable it in the GUI, you need to issue the
|
||||
following command (as root user on the console):
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# touch /etc/proxmox-backup/tape.cfg
|
||||
production use.
|
||||
|
||||
Proxmox tape backup provides an easy way to store datastore content
|
||||
onto magnetic tapes. This increases data safety because you get:
|
||||
|
@ -91,11 +91,6 @@ async fn run() -> Result<(), Error> {
|
||||
default_api_auth(),
|
||||
)?;
|
||||
|
||||
// Enable experimental tape UI if tape.cfg exists
|
||||
if Path::new("/etc/proxmox-backup/tape.cfg").exists() {
|
||||
config.enable_tape_ui = true;
|
||||
}
|
||||
|
||||
config.add_alias("novnc", "/usr/share/novnc-pve");
|
||||
config.add_alias("extjs", "/usr/share/javascript/extjs");
|
||||
config.add_alias("qrcodejs", "/usr/share/javascript/qrcodejs");
|
||||
|
@ -23,7 +23,6 @@ pub struct ApiConfig {
|
||||
templates: RwLock<Handlebars<'static>>,
|
||||
template_files: RwLock<HashMap<String, (SystemTime, PathBuf)>>,
|
||||
request_log: Option<Arc<Mutex<FileLogger>>>,
|
||||
pub enable_tape_ui: bool,
|
||||
pub api_auth: Arc<dyn ApiAuth + Send + Sync>,
|
||||
}
|
||||
|
||||
@ -42,7 +41,6 @@ impl ApiConfig {
|
||||
templates: RwLock::new(Handlebars::new()),
|
||||
template_files: RwLock::new(HashMap::new()),
|
||||
request_log: None,
|
||||
enable_tape_ui: false,
|
||||
api_auth,
|
||||
})
|
||||
}
|
||||
|
@ -497,7 +497,6 @@ fn get_index(
|
||||
"CSRFPreventionToken": csrf_token,
|
||||
"language": lang,
|
||||
"debug": debug,
|
||||
"enableTapeUI": api.enable_tape_ui,
|
||||
});
|
||||
|
||||
let (ct, index) = match api.render_template(template_file, &data) {
|
||||
|
@ -79,6 +79,14 @@ Ext.define('PBS.store.NavigationStore', {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Tape Backup",
|
||||
iconCls: 'pbs-icon-tape',
|
||||
id: 'tape_management',
|
||||
path: 'pbsTapeManagement',
|
||||
expanded: true,
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
text: gettext('Datastore'),
|
||||
iconCls: 'fa fa-archive',
|
||||
@ -118,29 +126,15 @@ Ext.define('PBS.view.main.NavigationTree', {
|
||||
view.rstore.on('load', this.onLoad, this);
|
||||
view.on('destroy', view.rstore.stopUpdate);
|
||||
|
||||
if (PBS.enableTapeUI) {
|
||||
if (view.tapestore === undefined) {
|
||||
view.tapestore = Ext.create('Proxmox.data.UpdateStore', {
|
||||
autoStart: true,
|
||||
interval: 60 * 1000,
|
||||
storeid: 'pbs-tape-drive-list',
|
||||
model: 'pbs-tape-drive-list',
|
||||
});
|
||||
view.tapestore.on('load', this.onTapeDriveLoad, this);
|
||||
view.on('destroy', view.tapestore.stopUpdate);
|
||||
}
|
||||
|
||||
let root = view.getStore().getRoot();
|
||||
if (root.findChild('id', 'tape_management', false) === null) {
|
||||
root.insertChild(3, {
|
||||
text: "Tape Backup",
|
||||
iconCls: 'pbs-icon-tape',
|
||||
id: 'tape_management',
|
||||
path: 'pbsTapeManagement',
|
||||
expanded: true,
|
||||
children: [],
|
||||
});
|
||||
}
|
||||
if (view.tapestore === undefined) {
|
||||
view.tapestore = Ext.create('Proxmox.data.UpdateStore', {
|
||||
autoStart: true,
|
||||
interval: 60 * 1000,
|
||||
storeid: 'pbs-tape-drive-list',
|
||||
model: 'pbs-tape-drive-list',
|
||||
});
|
||||
view.tapestore.on('load', this.onTapeDriveLoad, this);
|
||||
view.on('destroy', view.tapestore.stopUpdate);
|
||||
}
|
||||
},
|
||||
|
||||
@ -271,16 +265,12 @@ Ext.define('PBS.view.main.NavigationTree', {
|
||||
|
||||
reloadTapeStore: function() {
|
||||
let me = this;
|
||||
if (!PBS.enableTapeUI) {
|
||||
return;
|
||||
}
|
||||
|
||||
me.tapestore.load();
|
||||
},
|
||||
|
||||
select: function(path, silent) {
|
||||
var me = this;
|
||||
if (me.rstore.isLoaded() && (!PBS.enableTapeUI || me.tapestore.isLoaded())) {
|
||||
if (me.rstore.isLoaded() && me.tapestore.isLoaded()) {
|
||||
if (silent) {
|
||||
me.suspendEvents(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user