feat: update backup features and cron jobs
This commit is contained in:
@@ -22,7 +22,7 @@ export async function POST(req: NextRequest) {
|
||||
const db = config.databases.find(d => d.id === db_id)
|
||||
if (!db) return NextResponse.json({ ok: false, error: 'Veritabanı bulunamadı.' })
|
||||
|
||||
const filename = backupFilename()
|
||||
const filename = backupFilename(db.name)
|
||||
|
||||
try {
|
||||
// 1. Dump al
|
||||
|
||||
@@ -559,16 +559,16 @@ function BackupTab({ db }: { db: Db }) {
|
||||
<div className="rounded-xl border border-border/50 bg-black/20 p-4 space-y-3">
|
||||
<div className="text-[10px] font-mono text-muted uppercase tracking-wider">Google Drive Kurulumu</div>
|
||||
{[
|
||||
{ n: 1, text: 'console.cloud.google.com → Yeni proje oluştur (veya mevcut)' },
|
||||
{ n: 1, text: 'console.cloud.google.com → Proje seç/oluştur' },
|
||||
{ n: 2, text: '"APIs & Services" → "Enable APIs" → "Google Drive API" aç' },
|
||||
{ n: 3, text: '"Credentials" → "Service Accounts" → Yeni hesap oluştur' },
|
||||
{ n: 4, text: 'Hesaba tıkla → "Keys" → "Add Key" → "JSON" — dosyayı indir' },
|
||||
{ n: 5, text: 'Google Drive\'da yeni klasör aç → Sağ tık → Paylaş' },
|
||||
{ n: 6, text: 'Aşağıdaki e-postayı "Düzenleyici" olarak ekle ve klasör ID\'sini kopyala' },
|
||||
{ n: 3, text: '"Credentials" → "Service Accounts" → Yeni hesap oluştur → JSON key indir' },
|
||||
{ n: 4, text: 'Google Drive\'da bir klasör oluştur (örn. "VPS Backups")' },
|
||||
{ n: 5, text: 'Klasörü sağ tıkla → "Paylaş" → aşağıdaki service account e-postasını "Düzenleyici" olarak ekle', highlight: true },
|
||||
{ n: 6, text: 'Klasörü aç → URL\'deki /folders/XXXXX kısmını Klasör ID alanına yapıştır', highlight: true },
|
||||
].map(s => (
|
||||
<div key={s.n} className="flex gap-3 text-[11px] font-mono leading-relaxed">
|
||||
<span className="w-5 h-5 rounded-full bg-accent/10 border border-accent/20 text-accent flex items-center justify-center text-[10px] shrink-0 mt-0.5">{s.n}</span>
|
||||
<span className="text-muted/80">{s.text}</span>
|
||||
<div key={s.n} className={`flex gap-3 text-[11px] font-mono leading-relaxed ${(s as any).highlight ? 'bg-yellow-500/5 border border-yellow-500/20 rounded-lg px-2 py-1.5 -mx-2' : ''}`}>
|
||||
<span className={`w-5 h-5 rounded-full border flex items-center justify-center text-[10px] shrink-0 mt-0.5 ${(s as any).highlight ? 'bg-yellow-500/20 border-yellow-500/40 text-yellow-400' : 'bg-accent/10 border-accent/20 text-accent'}`}>{s.n}</span>
|
||||
<span className={(s as any).highlight ? 'text-yellow-200/80' : 'text-muted/80'}>{s.text}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user