===========
.. 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:
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");
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>,
}
templates: RwLock::new(Handlebars::new()),
template_files: RwLock::new(HashMap::new()),
request_log: None,
- enable_tape_ui: false,
api_auth,
})
}
},
],
},
+ {
+ text: "Tape Backup",
+ iconCls: 'pbs-icon-tape',
+ id: 'tape_management',
+ path: 'pbsTapeManagement',
+ expanded: true,
+ children: [],
+ },
{
text: gettext('Datastore'),
iconCls: 'fa fa-archive',
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);
}
},
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);
}