Skip to content

Commit

Permalink
added --exclude-tag-under=.ignorebackup
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Oscadal committed Jan 5, 2014
1 parent a197214 commit 74107ee
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Empty file modified README.md
100755 → 100644
Empty file.
4 changes: 3 additions & 1 deletion backup-home.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# See the GNU General Public License for more details.


# "touch .ignorebackup" in folders to be skipped

# CHANGE THIS VARIABLE TO MATCH YOUR BACKUP MEDIA LOCATION!

P='/media/backup'
Expand All @@ -18,7 +20,7 @@ P='/media/backup'
if [ -d "$P" ]
then
cd ~
sudo tar cvpzf "$P/home-backup-`date +%d.%m.%Y`.tar.gz" --one-file-system --exclude=/.cache --exclude-caches-all .
sudo tar cvpzf "$P/home-backup-`date +%d.%m.%Y`.tar.gz" --one-file-system --exclude-tag-under=.ignorebackup --exclude=/.cache --exclude-caches-all .
else
echo -e "Invalid folder: $P\n"
exit 1
Expand Down
4 changes: 3 additions & 1 deletion backup-root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
# See the GNU General Public License for more details.


# "touch .ignorebackup" in folders to be skipped

# CHANGE THIS VARIABLE TO MATCH YOUR BACKUP MEDIA LOCATION!

P='/media/backup'
Expand All @@ -18,7 +20,7 @@ P='/media/backup'
if [ -d "$P" ]
then
cd /
sudo tar cvpzf "$P/root-backup-`date +%d.%m.%Y`.tar.gz" --one-file-system --exclude=/proc --exclude=/media --exclude=/lost+found --exclude=/sys --exclude=/tmp --exclude=/mnt --exclude=/media --exclude=/dev /
sudo tar cvpzf "$P/root-backup-`date +%d.%m.%Y`.tar.gz" --one-file-system --exclude-tag-under=.ignorebackup --exclude=/proc --exclude=/media --exclude=/lost+found --exclude=/sys --exclude=/tmp --exclude=/mnt --exclude=/media --exclude=/dev --exclude-caches-all /
else
echo -e "Invalid folder: $P\n"
exit 1
Expand Down
5 changes: 3 additions & 2 deletions backup-www.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
# See the GNU General Public License for more details.


# "touch .ignorebackup" in folders to be skipped

# CHANGE THIS VARIABLE TO MATCH YOUR BACKUP MEDIA LOCATION!

P='/media/backup'


# CHANGE THIS PATH TO MATCH YOUR WEB MEDIA LOCATION!

cd ~/www
Expand All @@ -23,7 +24,7 @@ cd ~/www
# run
if [ -d "$P" ]
then
sudo tar cvpzf "$P/www-backup-`date +%d.%m.%Y`.tar.gz" --one-file-system .
sudo tar cvpzf "$P/www-backup-`date +%d.%m.%Y`.tar.gz" --one-file-system --exclude-tag-under=.ignorebackup --exclude-caches-all .
else
echo -e "Invalid folder: $P\n"
exit 1
Expand Down

0 comments on commit 74107ee

Please sign in to comment.