<% if notice.present? %>

<%= notice %>

<% end %> <% if flash[:alert].present? %>

<%= flash[:alert] %>

<% end %>

<%= link_to "Back to vehicles", vehicles_path, class: "back-link" %>

Download Backup

Download a gzip-compressed YAML backup of vehicles, users, maintenance schedules, fuel entries, and maintenance entries.

Authentication data, access keys, and browser sessions are not included.

<%= link_to "Download data backup", download_backup_path, class: "button button--primary" %> <%= link_to "Download backup with images", download_with_images_backup_path, class: "button button--secondary" %>

Restore Backup

Upload a `.yml.gz` backup exported from Car Tracker.

<%= form_with url: restore_backup_path, multipart: true, class: "stacked-form" do |form| %>
<%= form.label :backup_file, "Backup file" %> <%= form.file_field :backup_file, accept: ".gz,.yml.gz,application/gzip", required: true %>
Restore mode

Replace mode deletes existing vehicles, users, schedules, fuel entries, and maintenance entries before importing the backup.

<%= form.submit "Restore backup", class: "button button--primary" %>
<% end %>