Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: rsync and [0-9]

__/ [ amit ] on Thursday 12 October 2006 22:17 \__

> Hello Group,
> 
> 
> How can I make rsync in this command?
> 
> rsync -z -perms --progress --stats -b --backup-dir=/Thursday -a -r
> /usr/local/ldb/db/[0-9]/aDir
> /root/backups/Thursday/ldb/db/[0-9]/aDir
> 
> 
> where [0-9] stands for directories with numeric names.
> 
> 
> Thanks in advnce.
> Amit

Hi,

Try something like this.

for file in find /usr/local/ldb/db/ -maxdepth 1 | grep [0123456789]
 do
rsync -z -perms --progress --stats -b --backup-dir=/Thursday -a -r ${file}
/root/backups/Thursday/ldb/db/
done

You'll probably need to polish this because it's not tested and done in a
rush.

Hope it helps,

Roy

-- 
Roy S. Schestowitz      | "Ping this IP, see if it responds the second time"
http://Schestowitz.com  |  Open Prospects   ¦     PGP-Key: 0x74572E8E
Tasks: 139 total,   1 running, 137 sleeping,   0 stopped,   1 zombie
      http://iuron.com - knowledge engine, not a search engine

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index