Skip to content

OlgaLom/Backup-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

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 

About

Backup script to backup a users home directory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages