Case Study Lab VII: Parallel backup of partitions on external storage

Task Overview
Description of the task

We would like to perform regular backups of partitions drive to external data storage.

Write a script that backs up disk partitions in parallel. The script will have n arguments. Various arguments script defines the names of partitions to be backed up.

For simplicity, in the script, you can set two variables. The first will refer to the external storage device. The second will refer to the folder in which will be assembled this external storage.

Backup begin only when they successfully managed to mount external storage. After the end of any deposits, remove the external storage.

For each backed up partition, the script will list information about the backup (STDOUT) backup errors (STDERR) in a separate file in the destination directory.

Technical instructions

For solving the problem follow these steps:

  • Assume that the external storage can have multiple backups from different computers. Verify that the destination directory is a folder with the name of the computer. If the ingredient is not listed, then create it
  • Let some time for starting the dump command before running a scan revealed a backup
  • Every 30 seconds, verify that the process has any backup. If there is, continue to monitor advances
  • If there is a prior backup, delete it before starting the backup.