Created
December 2, 2012 04:45
-
-
Save nanotaboada/4187005 to your computer and use it in GitHub Desktop.
Really simple bash backup script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -e 'filelist' ] | |
then | |
files=`cat filelist` | |
for file in $files | |
do | |
if [ -e $file ] | |
then | |
tar czf backup.tar.gz $file | |
fi | |
done | |
else | |
echo "Cannot find list of files to backup: 'filelist'." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment