Skip to content

Latest commit

 

History

History
33 lines (15 loc) · 1.07 KB

README.md

File metadata and controls

33 lines (15 loc) · 1.07 KB

backup-in-linux

The above backup.sh file can be used to create a backup of files in linux using tar command

Step 1) create backup.sh file and for that open your terminal and write following code in your terminal

touch backup.sh

Step 2) change the property of this file to executable file

chmod +x backup.sh

Step 3) to edit the backup.sh write following command

nano backup.sh

step 4) Now write the code of backup.sh in your backup.sh file and change the names of source_dir and backup_dir name according to your choice....

step 5) press ctrl+s to save and ctrl+x to exit from the editor

step 6) now write following command in your terminal to execute the backup.sh file and take backup of your desired directory

  ./backup.sh

step 7) Now type "ls" in terminal to list all the contents step 8) Now you will see a file created with extension .tar.gz

To extract the file created open archive manager from utilities and from there open the file you created and you will get the option to extract all the archived file...