Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 967 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 967 Bytes

Backup Script

Description

Note: this script created for educational purposes

A script to backup the home directory of users.
The backup files will be created to the path /var/backups/Username/
With name Username_home_YYYYmmdd.tar.gz
E.g. : Olga_home_20190530.tar.gz

The flow of the script

  • The first step is to get the parameters of the script (the usernames)
  • Second step is to check if the user/users exists
  • For the third step the script tries to find the home directory of the user
  • Finally if the previous steps were performed correctly the scripts creates the backup file.

How to use

Run the script with parameter tha name of the user as bellow

user$ ./backup_home.sh  Username

OR you can run the script with many parameters as bellow in order to create backup for many users.

user$ ./backup_home.sh  Username1 Username2