backup folder/files using terminal
I’m trying to backup my minecraft server whenever I start it, so I’d like you help me with command that checks if in the backups folder there is X amount of old backups and if there is less than X backups than save current files, and otherwise delete oldest backup and save the current files as the newest. So, before I execute java -jar server.jar command I’d like the computer to take backup of my server and then start the server.