Our team was made of the students:
- Olive NDAYIZIGIYE
- Aymeric MASSE
- Paul LESUR
Our scripts have been tested on 2 Linux distributions:
- Arch Linux
- Debian GNU/Linux 8 (jessie)
Here is the list of the different tools (ie bash commands) in those scripts:
- basename (GNU coreutils) 8.23
- cat (GNU coreutils) 8.23
- date (GNU coreutils) 8.23
- diff (GNU diffutils) 3.3
- dirname (GNU coreutils) 8.23
- echo (built-in bash)
- expr (GNU coreutils) 8.23
- file 5.22
- find (GNU findutils) 4.4.2
- grep (GNU grep) 2.20
- hostname 3.15
- mkdir (GNU coreutils) 8.23
- rm (GNU coreutils) 8.23
- shift
- tar (GNU tar) 1.27.1
- test (GNU coreutils) 8.23
- touch (GNU coreutils) 8.23
- -d DIRECTORY
DIRECTORY is the folder you want to backup. It is recursive (each sub directory will have its own backup). It creates, in each directory a subdirectory named .backup which will contain the different backups.
- -i BACKIGNORE
The file BACKIGNORE contains a list of patterns you want to ignore during the backup. It is matched ONLY against the file name, NOT against the path of the files.
-
A subdirectory named .backup is created inside each directory inside DIRECTORY (the script is recursive)
-
If it's the first time you launch the script, it wil create inside .backup a file named backup_init.tar.gz which is the full backup of the folder
-
Each following use of the backup.sh will create a patch archive which will use backup_init.tar.gz as a reference. Patch archives contain all binaries, but patch files for the text files (see man diff).
-
The patch archives are named like this: backup_time_since_epoch_hostname.tar.gz
./backup.sh -d folder/ -i backignore
- -o OUTPUT_DIR
OUTPUT_DIR is the folder where you want to restore the ARCHIVE given
- -a ARCHIVE
The archive (either patch or full) to backup inside OUTPUT_DIR
- This script first delete ALL files inside the OUTPUT_DIR
- It then restores the backup
- If it's a patch archive, it restores backup_init.tar.gz then patch the result thanks to ARCHIVE
./restore_backup.sh -o folder/ -a folder/.backup/backup_init.tar.gz
./restore_backup.sh -o folder/ -a folder/.backup/backup_1111111_hostname.tar.gz
- -d DIRECTORY
DIRECTORY is the folder where the backups are stored
- -i BACKIGNORE
The file BACKIGNORE contains a list of patterns you want to ignore during the backup. It is matched ONLY against the file name, NOT against the path of the files.
- -a ARCHIVE
Is the name of the patch archive you want to use as the reference
This script creates a patch archive except its reference is another patch archive. The behavior is the same as backup.sh otherwise.
./backup_inc -d folder/ -a folder/.backup/backup_1111_hostname.tar.gz -i inc_backignore