Nov. 12th, 2017

sinisterporpoise: (Default)

This wasn't quite working the way it should have. Now it will correctly implement incremental backups of the home directory on Unix, Mac OSX and Linux systems.

 #!/bin/bash
 
 
cat << here
 
-----------------------------------------------------------------------------
 
Sinister Porpoise Computing Backup Script
Test script for creating multiple
backup files.
 
Lara Landis
11/10/2017
Personal Bash Script
 
----------------------------------------------------------------------------
here
 
echo "Now creating backup files..."
 
x=1
y=1 
 
if [[ -f "backup.tar.gz" ]]; then
    x=1
    if [[ -f "backup${y}.tar.gz" ]]; then
while (x=1)
do
if [[ -f "backup${y}.tar.gz" ]]; then
x=1
y=y+1
fi
done
elif [[ ! -f "backup${y}.tar.gz" ]]; then
tar -czvf "backup${y}.tar.gz" /home
fi
else
tar -cvzf "backup.tar.gz" /home
fi
 

Profile

sinisterporpoise: (Default)
sinisterporpoise

April 2019

S M T W T F S
 1234 56
78910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 10th, 2025 07:22 pm
Powered by Dreamwidth Studios