SOLVED: Re: include/exclude: I miss the point

Hans Troost hans.troost at gmail.com
Sun Sep 12 06:17:09 MDT 2010


Hi Michal,

(hope this mail is short enough for the list, previous one bounced: too 
big)

Read, re-read, read again both your mail and the rsync-documentation 
(again) and think I get it now.

First, regarding your comments (not all):

1. you are right, the .kabc\....-files were missing (did not check it 
properly). Now I have them (see my solution below)

rest of your comments let me "understand what I read in the manual".
One remark: the Exclude ".mybackup/backup*.log.* is not redundant, due to 
the Include ".mybackup". The ".mozilla/extensions" was redundant.

2 Excluding the [A-Z] and [a-z] works when specifying this: hans/[A-Z]* 
etc.

Now I have the following which works perfect for me (test -version):

rsync command:
rsync -n -vvvvv -axhhX --no-perms --omit-dir-times --stats\
 --backup --backup-dir=`date +%Y-%m-%d`/updated --suffix=.`date +%H%M`\
 --delete --delete-excluded\
 --backup-dir-dels=`date +%Y-%m-%d`/deleted --suffix-dels=.`date +%H%M`\
 --log-file=/home/hans/.mybackup/backup-test.log.`date +%Y%m%d`-`date 
+%H%M`\
 --include-from=/home/hans/.mybackup/include.txt\
 --exclude-from=/home/hans/.mybackup/exclude.txt\
   /home/hans /mnt/backup/test/

I herewith attach both the include.txt and exclude .txt and the listing of 
backed-up files.


Best regards,

Hans Troost
-------------- next part --------------
#
# to get KAdressbook entries + distribution lists
#
.kde4/
.kde4/share/
.kde4/share/apps/
.kde4/share/apps/kabc/
.kde4/share/apps/kabc/distlists
.kde4/share/apps/kabc/std.vcf
#
# to get firefox bookmarks
#
.mozilla/
.mozilla/firefox/
.mozilla/firefox/plp6wzjm.default/
.mozilla/firefox/plp6wzjm.default/bookmarkbackups/
.mozilla/firefox/plp6wzjm.default/bookmarkbackups/*
#
# to get the backup-scripts and associated files like this
#
.mybackup

-------------- next part --------------
.*
.mybackup/backup*.log.*
.mozilla/*
.mozilla/firefox/*
.mozilla/firefox/plp6wzjm.default/*
.kde4/*
.kde4/share/*
.kde4/share/apps/*
.kde4/share/apps/kabc/*
*.*~
Desktop
Downloads
Movies
Music
Pictures
tmp
Videos
#
# for testing purposes only will be commented out on real use
# hans/[a-z]*
# hans/[A-Z]*
# hans/2*
-------------- next part --------------
/mnt/backup/test:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 6 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 4 hans hans 0 2010-09-11 21:08 hans/


/mnt/backup/test/hans:
total 0
drwxr-xr-x 4 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 .kde4/
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 .mozilla/
drwxr-xr-x 1 hans hans 0 2010-09-11 21:08 .mybackup/


/mnt/backup/test/hans/.kde4:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 4 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 share/


/mnt/backup/test/hans/.kde4/share:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 apps/


/mnt/backup/test/hans/.kde4/share/apps:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 1 hans hans 0 2010-09-11 21:08 kabc/


/mnt/backup/test/hans/.kde4/share/apps/kabc:
total 28
drwxr-xr-x 1 hans hans     0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans     0 2010-09-11 21:08 ../
-rwxr-xr-x 1 hans hans   202 2010-09-11 11:55 distlists*
-rwxr-xr-x 1 hans hans 21968 2010-09-11 11:55 std.vcf*


/mnt/backup/test/hans/.mozilla:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 4 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 firefox/


/mnt/backup/test/hans/.mozilla/firefox:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 plp6wzjm.default/


/mnt/backup/test/hans/.mozilla/firefox/plp6wzjm.default:
total 0
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans 0 2010-09-11 21:08 ../
drwxr-xr-x 1 hans hans 0 2010-09-11 21:08 bookmarkbackups/


/mnt/backup/test/hans/.mozilla/firefox/plp6wzjm.default/bookmarkbackups:
total 216
drwxr-xr-x 1 hans hans     0 2010-09-11 21:08 ./
drwxr-xr-x 2 hans hans     0 2010-09-11 21:08 ../
-rwxr-xr-x 1 hans hans 33921 2010-09-05 19:16 bookmarks-2010-09-05.json*
-rwxr-xr-x 1 hans hans 33921 2010-09-06 20:08 bookmarks-2010-09-06.json*
-rwxr-xr-x 1 hans hans 34164 2010-09-07 21:25 bookmarks-2010-09-07.json*
-rwxr-xr-x 1 hans hans 34164 2010-09-08 23:14 bookmarks-2010-09-08.json*
-rwxr-xr-x 1 hans hans 34164 2010-09-10 14:30 bookmarks-2010-09-10.json*
-rwxr-xr-x 1 hans hans 34164 2010-09-11 20:42 bookmarks-2010-09-11.json*


/mnt/backup/test/hans/.mybackup:
total 64
drwxr-xr-x 1 hans hans    0 2010-09-11 21:08 ./
drwxr-xr-x 4 hans hans    0 2010-09-11 21:08 ../
-rwxr-xr-x 1 hans hans  471 2010-09-10 20:44 backup-dry-run.sh*
-rwxr-xr-x 1 hans hans 1305 2010-09-08 17:06 backup-old.sh*
-rwxr-xr-x 1 hans hans  749 2010-09-10 19:43 backup.sh*
-rwxr-xr-x 1 hans hans  457 2010-09-11 20:54 backup-test.sh*
-rwxr-xr-x 1 hans hans  101 2010-09-10 20:48 exclude-old .txt*
-rwxr-xr-x 1 hans hans   39 2010-09-10 21:01 exclude-test.txt*
-rwxr-xr-x 1 hans hans  309 2010-09-11 21:08 exclude.txt*
-rwxr-xr-x 1 hans hans  187 2010-09-10 19:24 include-test.txt*
-rwxr-xr-x 1 hans hans  448 2010-09-11 21:08 include.txt*
-rwxr-xr-x 1 hans hans 4480 2010-08-30 20:26 log-file legend.txt*
-rwxr-xr-x 1 hans hans 1656 2010-08-31 20:37 mailing-list-question-01.txt*
-rwxr-xr-x 1 hans hans 9132 2010-08-20 17:38 rsync.txt*
-rwxr-xr-x 1 hans hans 3422 2010-09-11 21:04 test-results.txt*


More information about the rsync mailing list