Skip to content

Instantly share code, notes, and snippets.

@nanotaboada
Created December 2, 2012 04:45
Show Gist options
  • Save nanotaboada/4187005 to your computer and use it in GitHub Desktop.
Save nanotaboada/4187005 to your computer and use it in GitHub Desktop.
Really simple bash backup script
#!/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