Proper way to backup a yunohost and to handle yunohost's own backups?

Short question: I did not manage to get the borg app to run, hence I rely upon the built-in method to backup. However, there is no schedule available, therefore I use a cronjob to perform yunohost backup create daily and then back the tar file up with restic to someplace else. But there is no built-in way to dispose of older backups according to a retention schedule, is there some way to avoid cluttering the /home/yunohost.backup folder with countless similar backups? Is some kind of script available that I did not yet find? Or a way to prevent the backup command from sending emails after a flawless backup?
Thanks!

Hello,
I don’t know how to stop the yunohost server from mailing you the results, but as for the numbers of backups kept, I use a simple crontab line with find and RM

such as (execute everynight at 22h00, keeps 7 days of backups, if you backup everyday) :

0 22 * * * find /home/yunohost.backup/archives/* -mtime +7 -exec rm {} ;

Hope this helps you !

1 Like

Yes, actually it does a lot, je te remercie !

Now to find a way to customize the daily emails and I am rather happy. Still, a complete (schedule, retention) backup system should be built into Yunohost but maybe for others the borgbackup way worked better than for me.

1 Like