Script for backing up Runtipi apps data with retention policy.
Warning
Runtipi v4 and further needs script v2
I suggest to refer directly into runtipi official guides here : runtipi.io/docs
Thanks to Stavros for documentation and publishing. 🤩
You need to set your runtipiPath
inside the script to point to your actual Runtipi path.
Retention policy is defined in script and is 3 by default, you can change it to your own convenience :
dailyRetention=3
weeklyRetention=3
monthlyRetention=3
yearlyRetention=3
This define the number of files that will be kept for each type of backup.
Accepted Values | Description | Default | Required |
---|---|---|---|
daily ,weekly ,monthly ,yearly |
Set the name of the final backup, for example if you use daily the backup name will be myapp-daily-date.tar.gz |
daily |
no |
stop ,ignore |
Stop the app before backing up or backup anyway. | stop |
no |
You will need a job scheduler to execute the script accordingly with your backup strategy, 2 examples with Cron below :
Basic example with all types daily, weekly, monthly and yearly
# Every day from Tuesday to Sunday at 2 AM - daily
0 2 * * 2-7 /path/to/runtipi/scripts/backup_runtipi_apps.sh daily
# Every Monday at 2 AM - weekly
0 2 * * 1 /path/to/runtipi/scripts/backup_runtipi_apps.sh weekly
# Every 1st day of the month at 3 AM - monthly
0 3 1 * * /path/to/runtipi/scripts/backup_runtipi_apps.sh monthly
# Every 1st day of January at 4 AM - yearly
0 4 1 1 * /path/to/runtipi/scripts/backup_runtipi_apps.sh yearly
Simply use the restore functionnality from Runtipi WebUI.
My Apps → AppName → Backups
Choose your desired backup and select Restore
- Restoration Script : It was initially planned but built-in runtipi backup functionnality made it feel unnecessary.
- Check if the restored app has been stopped correctly
- Reference List to choose which to backup has been removed but it could be replaced with a whitelist/blacklist system
- Using Runtipi built-in functionalities : Runtipi is growing and may add backup support in runtipi-cli, it could probably even make this script obsolete in the future.