mirror of
https://github.com/eduardogsilva/routerfleet.git
synced 2025-07-14 12:14:23 +02:00
Backup download and delete.
This commit is contained in:
parent
60e1d557aa
commit
31b1c663f2
10 changed files with 110 additions and 11 deletions
|
@ -2,6 +2,7 @@ from django.db import models
|
|||
from router_manager.models import Router
|
||||
import uuid
|
||||
import hashlib
|
||||
import os
|
||||
|
||||
|
||||
class RouterBackup(models.Model):
|
||||
|
@ -19,6 +20,7 @@ class RouterBackup(models.Model):
|
|||
finish_time = models.DateTimeField(blank=True, null=True)
|
||||
backup_text = models.TextField(blank=True, null=True)
|
||||
backup_text_hash = models.CharField(max_length=64, blank=True, db_index=True)
|
||||
backup_text_filename = models.CharField(max_length=255, blank=True, null=True)
|
||||
backup_binary = models.FileField(upload_to='backups/', blank=True, null=True)
|
||||
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
|
@ -32,4 +34,3 @@ class RouterBackup(models.Model):
|
|||
self.backup_text_hash = ''
|
||||
super(RouterBackup, self).save(*args, **kwargs)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue