<%- include('partials/sidebar', { activePage: activePage || 'backup', company }) %>
Backup & Recovery
<%= (typeof session !== 'undefined' && session.isCashier) ? t('admin.role.cashier', 'Kasir') : t('admin.role.admin', 'Admin') %>
<% if (msg) { %>
<%= msg.text %>
<% } %>
Total Backup
<%= total %>
File tersimpan
Database
<%= backups.filter(b => b.type === 'database').length %>
Backup database
Settings
<%= backups.filter(b => b.type === 'settings').length %>
Backup pengaturan
Total Size
<%= (backups.reduce((sum, b) => sum + b.sizeKB, 0) / 1024).toFixed(1) %> MB
Kapasitas digunakan
Buat Backup Baru
Upload & Restore Backup
File .db (database) atau .json (settings)
Pembersihan Otomatis
Backup lebih lama dari periode ini akan dihapus
Riwayat Backup
<% if (backups.length === 0) { %>

Belum ada file backup tersedia

<% } else { %>
<% backups.forEach(backup => { %> <% }) %>
Nama File <%= t('common.type','Tipe') %> Ukuran Tanggal Dibuat <%= t('common.actions','Aksi') %>
<%= backup.fileName %>
<%= backup.type === 'database' ? 'Database' : 'Settings' %> <%= backup.sizeKB %> KB <% if (backup.createdDate) { %> <%= backup.createdDate.toLocaleString('id-ID', { year: 'numeric', month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' }) %> <% } else { %> - <% } %>
Download
<% } %>