Ubuntu Pastebin

Paste from IMTheNachoMan at Sat, 17 Oct 2015 22:54:19 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# current folder structure under /data/backup
one/
    one/ding bingo
        one/ding bingo/a
    one/that this
        one/that this/b
        one/that this/a
    one/this that
        one/this that/b
        one/this that/a
    one/bingo
two/
    two/ding bingo
        two/ding bingo/a
    two/that this
        two/that this/b
        two/that this/a
    two/b
    two/this that
        two/this that/b
        two/this that/a


# the directories I want to backup
BACKUP_PATHS=('/data/backup/one' '/data/backup/two')

# this does show that all the files will be backed up
rsync -avzpAn "${BACKUP_PATHS[@]}" user@server:/some/destination/path

# now i want to exclude "/data/backup/one/ding bingo" but this still seems to include it
rsync -avzpAn --exclude="/data/backup/one/ding bingo" "${BACKUP_PATHS[@]}" user@server:/some/destination/path
Download as text