13 lines
347 B
Python
13 lines
347 B
Python
|
|
from django.core.management.base import BaseCommand
|
||
|
|
|
||
|
|
from core.services.backups import create_backup_now
|
||
|
|
|
||
|
|
|
||
|
|
class Command(BaseCommand):
|
||
|
|
help = "Create a backup JSON under /Backups immediately."
|
||
|
|
|
||
|
|
def handle(self, *args, **options):
|
||
|
|
path = create_backup_now()
|
||
|
|
self.stdout.write(self.style.SUCCESS(f"Backup created: {path}"))
|
||
|
|
|