Przejdź do głównej zawartości


Backup with rsync question


I am setting up a rotating 7-day #backup for my #yunohost, using #rsync. I managed to create a list of #cron jobs, like this:
sudo rsync -aur /home/yunohost.backup /media/backup_disk/YNHx260_bkp/Sunday
but the problem is that rsync keeps adding files to target directories, instead of replacing their content, which is my intention.

Should I use rm to clean up the target before rsync, or is there a more intelligent way to do that?
in reply to 8Petros [Signal: Petros.63]

Huh, cool, I actually have the same problem, which I realized when I did a backup recovery recently. I'll likely look into that soonish and probably post about it when I figure it out.