rsync  version 3.1.2  protocol version 31

I've run into an issue using rsync on my QNAP NAS.  I've installed Entware-ng
on the NAS so that I can install better versions of programs, rsync being
one of them.

But, I've run into an issue wqith using the --delete option, as it has
problems using wildcards.

Initially a backup script looked like:

for d in /share/Public/videos/[Gg]*
rsync -av --delete $d /share/Backup-HDD-03

I've discovered that any directory that starts with "A", or "a" that is on
the backup disk that is no longer on the source disk is not getting deleted.

In order to only back up directories/files that start with "G", or "g",
required a script that looks like:

pushd /share/Public/videos
ls -d [0-9A-FH-Za-fh-z]* > /share/homes/admin/bin/backup_exclude_list
echo "lost+found" >> /share/homes/admin/bin/backup_exclude_list
for d in .
rsync -av --delete --exclude-from=/share/homes/admin/bin/backup_exclude_list \
$d /share/Backup-HDD-03

There has to be a much simplier script, or is this really it?

Thanks for any tips.

e-mail: |            /~\ The ASCII (140 char limit)       \ / Ribbon Campaign
Visit - URL:                           X  Against
                             / \ HTML Email
"What do you say Beckett. Wanna have a baby?" - Castle to Det. Beckett
"How long have I been gone?" Alexis after seeing Castle and Beckett w/ baby
 - Castle - 11/25/13

Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options:
Before posting, read:

Reply via email to