Skip to content

Backup

With Saltbox you can either run a backup task manually or schedule it to run automatically.

Manual Backup

Info

This step assumes you have completed the configuration of the backup_config.yml in the configuration step.

sb install backup
screen -dmS saltbox-backup sb install backup
screen -r
CTRL A + D

Scheduled Backup

Info

This step assumes you have completed the configuration of the backup_config.yml in the configuration step.

sb install set-backup
crontab -e
0 4 * * * sudo PATH='/usr/bin:/bin:/usr/local/bin' env ANSIBLE_CONFIG='/srv/git/saltbox/ansible.cfg' '/usr/local/bin/ansible-playbook' '/srv/git/saltbox/backup.yml' >> '/home/seed/logs/saltbox_backup.log' 2>&1

Remember to edit the seed username if you changed the Saltbox user in the accounts.yml.

Visit crontab.guru for help with the scheduling format.