Page MenuHomeGRNET

restore.html.erb
No OneTemporary

File Metadata

Created
Sun, Aug 10, 7:41 AM

restore.html.erb

<div class="row">
<div class="col-xs-4">
<% if @client.is_backed_up? %>
<div class="panel panel-default">
<div class="panel-heading">
<h3>Restore files for "<%= @client.name %>"</h3>
</div>
<br />
<%= bootstrap_form_tag(url: run_restore_client_path(@client), remote: true,
layout: :horizontal, label_col: 'col-xs-4', control_col: 'col-xs-7',
html: { id: 'basic-form' } ) do |f| %>
<div class="form-group">
<label class="col-xs-4 control-label"></label>
<div class="col-xs-7">
<p class="form-control-static">
Restore to most recent backup by leaving date and time blank
</p>
</div>
</div>
<%= f.text_field :restore_date %>
<%= f.time_select :restore_time, ignore_date: true, minute_step: 30, prompt: true %>
<%= f.select(:fileset,
options_from_collection_for_select(@client.file_sets, :id, :file_set)) %>
<%= f.text_field :restore_location, placeholder: '/tmp/bacula_restore' %>
<div class="row">
<div class="col-xs-5 col-xs-offset-6 text-right">
<%= f.submit 'Select Specific Files', id: 'select-files', class: 'btn btn-primary' %>
</div>
</div>
<br />
<div class="row">
<div class="col-xs-3 col-xs-offset-8">
<%= f.submit 'Restore All Files', class: 'btn btn-warning text-right',
data: { confirm: "This will restore all your files" }
%>
</div>
</div>
<% end %>
</br>
</div>
<% else %>
<div class="alert alert-warning">
<p>Can not issue a restore for this host. It has no successful backups</p>
</div>
<% end %>
<%= link_to 'Back to client', client_path(@client), class: 'btn btn-danger', role: 'button' %>
</div>
<%= render partial: 'file_selector' %>
</div>
<script type="text/javascript">
<% min_date, max_date = @client.backup_enabled_datetime_range %>
var minDate = '<%= min_date %>';
var maxDate = '<%= max_date %>';
$('#restore_date').datepicker({
dateFormat: 'yy-mm-dd',
minDate: minDate,
maxDate: maxDate
});
</script>

Event Timeline