I am trying to do an rsync or scp from machine1 to machine2. I am getting arg list to long.
I am using centos 5 machine 1 and centos 4.5 on machine2.
I am using the default shell which is bash.
How can I get past this?
THanks,
Jerry
On 8/30/07, Jerry Geis geisj@pagestation.com wrote:
I am trying to do an rsync or scp from machine1 to machine2. I am getting arg list to long.
I am using centos 5 machine 1 and centos 4.5 on machine2.
I am using the default shell which is bash.
How can I get past this?
Change your rsync command around a bit.
(If you can show us the command you're using, we can make some suggestions)
I would gather that you have a huge amount of files in the dir you're syncing.
On 8/30/07, Jerry Geis <geisj at pagestation.com http://lists.centos.org/mailman/listinfo/centos> wrote:
/ I am trying to do an rsync or scp from machine1 to machine2.
/>>/ I am getting arg list to long. />>/ />>/ I am using centos 5 machine 1 and centos 4.5 on machine2. />>/ />>/ I am using the default shell which is bash. />>/ />>/ How can I get past this? /
Change your rsync command around a bit.
(If you can show us the command you're using, we can make some suggestions)
I would gather that you have a huge amount of files in the dir you're syncing.
I was trying to do "rsync -a root@machine2:/somedirectory ."
There are multiple directories under the tree and yes many files.
also tried "scp -r root@machine2:/somedirectory ." with the same result of too many files.
Jerry
I was trying to do "rsync -a root@machine2:/somedirectory ."
There are multiple directories under the tree and yes many files.
also tried "scp -r root@machine2:/somedirectory ." with the same result of too many files.
Jerry
First, back up the files to somewhere else on the same machine just in case...
Then, consider doing a proper recursive tar or zip that preserves permissions etc and dust the rest and then do it as only a single file or thereabouts
- rh
Robert - elists wrote:
I was trying to do "rsync -a root@machine2:/somedirectory ."
There are multiple directories under the tree and yes many files.
also tried "scp -r root@machine2:/somedirectory ." with the same result of too many files.
Jerry
First, back up the files to somewhere else on the same machine just in case...
Then, consider doing a proper recursive tar or zip that preserves permissions etc and dust the rest and then do it as only a single file or thereabouts
rsync -a knows as much or more about permissions, etc. as tar and zip do. And it is vastly more efficient when you repeat it to the same destination.
I've seen 2 different error messages mentioned: "arg list to long", and "too many files." The former is repeated a few times with the same misspelling which casts doubt. The later makes more sense but has nothing to do with the rsync's arguments.
Can you go back to the beginning and copy/paste the original command with the actual error message?
rsync -a knows as much or more about permissions, etc. as tar and zip do. And it is vastly more efficient when you repeat it to the same destination.
-- Les Mikesell
I understand, I was merely trying to supply a possible temporary workaround if the rsync syntax they were using was correct and there was a real "too much something" error.
- rh
/
/>>/ rsync -a knows as much or more about permissions, etc. as tar and zip />>/ do. And it is vastly more efficient when you repeat it to the same />>/ destination. />>/ />>/ -- />>/ Les Mikesell /
I understand, I was merely trying to supply a possible temporary workaround if the rsync syntax they were using was correct and there was a real "too much something" error.
- rh
Doing " rsync -a /somedirectory/* . " doesnt work Doing " rsync -a /somedirectory . " does work.
My bad.
Jerry
In article 46D6F986.4040106@pagestation.com, Jerry Geis geisj@pagestation.com wrote:
Doing " rsync -a /somedirectory/* . " doesnt work
If you have a ton of file in /somedirectory/ then the shell will complain when it tries to construct a list of arguments a mile long.
Doing " rsync -a /somedirectory . " does work.
Yes, and you should also note the difference between /somedirectory and /somedirectory/ which in rsync cause different things to happen.
If /somedir contains files a, and b, then this:
rsync -a /somedir /destdir
will create /destdir/somedir/a and /destdir/somedir/b
whereas:
rsync -a /somedir/ /destdir
will create /destdir/a and /destdir/b
Cheers Tony
Please for the love of God fix how your client handles email threads.
On 8/30/07, Jerry Geis geisj@pagestation.com wrote:
I was trying to do "rsync -a root@machine2:/somedirectory ."
There are multiple directories under the tree and yes many files.
also tried "scp -r root@machine2:/somedirectory ." with the same result of too many files.
How many files are in the directory here? I've never run across this sort of thing acting on the directory and not the files themselves.
Jim Perrin spake the following on 8/30/2007 8:56 AM:
Please for the love of God fix how your client handles email threads.
On 8/30/07, Jerry Geis geisj@pagestation.com wrote:
I was trying to do "rsync -a root@machine2:/somedirectory ."
There are multiple directories under the tree and yes many files.
also tried "scp -r root@machine2:/somedirectory ." with the same result of too many files.
How many files are in the directory here? I've never run across this sort of thing acting on the directory and not the files themselves.
Nor have I, and I have copied entire machines over rsync. Maybe an -av will give more detail.
Jerry Geis wrote:
/ I am trying to do an rsync or scp from machine1 to machine2.
/>>/ I am getting arg list to long. />>/ />>/ I am using centos 5 machine 1 and centos 4.5 on machine2. />>/ />>/ I am using the default shell which is bash. />>/ />>/ How can I get past this? /
Change your rsync command around a bit.
(If you can show us the command you're using, we can make some suggestions)
I would gather that you have a huge amount of files in the dir you're syncing.
I was trying to do "rsync -a root@machine2:/somedirectory ."
There are multiple directories under the tree and yes many files.
also tried "scp -r root@machine2:/somedirectory ." with the same result of too many files.
Are you sure that was the exact command? Rsync can handle a huge number of files internally, although it does require a certain amount of memory for each filename in the tree during the transfer. You should only see that 'arg list too long' error if you let the shell expand a wildcard like * in a directory containing many files.
I usually prefer to go the source machine/directory and give the command like "rsync -a . somemachine:/somedirectory", though.
Jerry Geis spake the following on 8/30/2007 8:29 AM:
On 8/30/07, Jerry Geis <geisj at pagestation.com http://lists.centos.org/mailman/listinfo/centos> wrote:
/ I am trying to do an rsync or scp from machine1 to machine2.
/>>/ I am getting arg list to long. />>/ />>/ I am using centos 5 machine 1 and centos 4.5 on machine2. />>/ />>/ I am using the default shell which is bash. />>/ />>/ How can I get past this? /
Change your rsync command around a bit.
(If you can show us the command you're using, we can make some suggestions)
I would gather that you have a huge amount of files in the dir you're syncing.
I was trying to do "rsync -a root@machine2:/somedirectory ."
There are multiple directories under the tree and yes many files.
also tried "scp -r root@machine2:/somedirectory ." with the same result of too many files.
Jerry
How about an explicit path for the destination to see if it is something in your shell?
On 8/30/07, Jerry Geis geisj@pagestation.com wrote:
I am trying to do an rsync or scp from machine1 to machine2. I am getting arg list to long.
I am using centos 5 machine 1 and centos 4.5 on machine2.
I am using the default shell which is bash.
How can I get past this?
Thanks, Jerry
I would use find and xargs. That's usually how I get around it. You'll have to experiment though. Something like: find ./ -type f | xargs scp ..... That's not a fully functional command!