Enable/disable backups from cli

Is it possible enable/disable (and run) backups from the CLI instead of on the maintenance page ( miab.foo/admin#system_backup), please?

The reason for this is that I’m backuping to a sshfs mounted partition and it might have disconnected and if so then the root system would fill up causing trouble…

You might be able to enable/disable by editing /home/user-data/backup/custom.yaml
Running a backup from command line can be done by sudo management/backup.py.

Alternatively you can create a file /home/user-data/backup/before-backup This will be run before a backup is created, you can use it to check that your mount is there and remount it if necessary.

1 Like

Didn’t quite yet figure out or find howto…

And didn’t figure out where mail-in-a-box keeps it’s config for the backups.

If I did I could just edit that file…

Thanks… This might do for now, but it’s not perfect…

If the other host is down for some reason then even running the before-backup script will not help that and the backup will run and fill up /

Would perhaps also be a good idea if this were configurable: "The box makes an incremental backup each night. " Each night at when? Some people are night people…

Easiest might be to simply copy it, e.g. cp custom.yaml custom.yaml.enabled then disable it in the admin ui, and copy it again, cp custom.yaml custom.yaml.disabled. Then you can look at the differences between the files.

This file is it.

Granted, just thought it might help

Somewhere between 3 and 4.

This topic was automatically closed 40 days after the last reply. New replies are no longer allowed.