saving last 5 backups of a directory script on linux ubuntu
by Responsible_sky from LinuxQuestions.org on (#6DJNV)
So I have this task where I take backups everyday at 2 am by creating systemd service and using rsync, I did most of the task by creating a .service and a .timer which execute a specific script every day at 2 AM but I just can't find a way to finish the last part where I save the latest 5 versions of the directory and overwriting the latest on the oldest version, any ideas?