Creating a current backup based on the user input for the backup source and destination
After making backup scripts via tar
, we need to make a completely interactive script that asks for all of the details from us to be inputted with the keyboard. Let's learn how to make this happen!
Getting ready
If you followed the previous recipe, then you won't need anything new β the same requirements apply.
How to do itβ¦
Our premise has changed somewhat this time around. We want a fully functional backup script, but one that doesn't use any static variables (like the previous one). Also, we want to be able to call this script at will, which is why we're using multiple questions to set up the necessary variables. Here's what the script should look like:
#!/bin/bash # V1.0 / Jasmin Redzepagic / 01/11/2021 Initial script version # Distribution allowed under GNU Licence V2.0 # This script does a custom backup, based on our arguments # We need...