So now we’ll improve this script on several points.Īre you a bit lost in the Linux command line? Check this article first, for the most important commands to remember, and a free downloadable cheat sheet so you can have the commands at your fingertips. Use sudo if needed (if the goal is to back up system files, you probably need sudo).Īs you can see, it’s a basic script, that will overwrite the old backup each time. Then add the permission to execute the script with: I’m using “/home/pi” everywhere, but you probably have to adjust this with your username (/home/pat for example).Īnd finally, the first version of a simple script could look like this: #!/bin/bash Then we need to create a backup folder to store the files: In my script, I’ll use a file and a folder that you can adapt to your needs: How to send the file to another computer (in the script or manually).īefore starting to create the script, you have to identify the files you need to save.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |