rsync wildcards

zimu

Diamond Member
Jun 15, 2001
6,209
0
0
hey guys,

i'm trying to break up my rsync a bit so it handles one letter of the alphabet at a time.

so, rsync /home/a*, rsync /home/b* and so forth. however it seems to only copy the first folder with "a" and ignore all the rest.

i've tried rsyc /home but it pretty much does not work given how many folders and files i have - it spent 15 minutes just calculating the number of files which is a waste of time...


any ideas how to break up the task?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Counting them isn't really a waste of time since it has to compare file lists and checksum all of the files. And the glob should be expanded by the shell and not rsync, so when you type 'rsync /home/a*' what the shell actually runs is 'rsync /home/a1 /home/a2 etc'.
 

zimu

Diamond Member
Jun 15, 2001
6,209
0
0
hi thanks for the response!

re the last bit of what you wrote, that's exactly wha ti want it to do! e.g. if i have:
/home/aa
/home/ab
/home/ac
/home/ba
/home/bb

and i want to rsync all the a's (aa,ab,ac) then i want to type rsync [options] a*.
however doing that only rsyncs aa, not ab/ac.
how do i rsync only aa,ab,ac out of the list above?

thanks!
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It should be doing it already unless the shell isn't expanding /home/a* properly for some reason. Does 'echo /home/a*' give you the right list?
 

zimu

Diamond Member
Jun 15, 2001
6,209
0
0
the /home/a* shows all the folders i want - i.e. aa/ab/ac.
this is messed up!

the command i'm running is:
rsync --links --stats --progress --verbose --backup --recursive /home/a* rsyncserver::location
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Why not just let it run over all of /home in one run just once and see how long it takes, I doubt you'll save any time by breaking up. If anything it'll probably slow it down.
 

zimu

Diamond Member
Jun 15, 2001
6,209
0
0
i tried that! quite a number of issues:
- 30gb in /home directory. i'd rather split it up by day
- i ran it last night (non verbose) and it ran the entire night. the next day it had frozen and had only transferred 300mb
- i ran it this afternoon (verbose). it counted 1,000,000+ files before it froze, even before transfer began. this took about 20 mins.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Are you sure it was frozen? I've never tried to rsync a million files but if it's really freezing instead of crashing or quitting with an error I'd suspect some problems somewhere else.
 

skyking

Lifer
Nov 21, 2001
22,696
5,819
146
Are you using rsync primarily for backup purposes?
If so, take a look at dirvish.
It uses rsync to make incremental backups, and may have some features that are native, that you are trying to script.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Seems a bit overboard, but this might work. I guess I don't have enough files, I've only transfered ~60GB of bigger files using rsync.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |