0

Say I want to rsync /dir of a remote host to the /dir (same path) of a local host. For that I would do rsync -artz root@remote-host:/dir/* /dir/ from my local host. The /dir on the remote host contains the following when I perform an ls -la /dir:

total 20
drwxr-xr-x  5 root root 4096 Mar 15 20:50 .
drwxr-xr-x 22 root root 4096 Feb 17 22:42 ..
drwxr-xr-x  3 root root 4096 Feb 18 00:33 some_dir
drwxr-xr-x  2 root root 4096 Mar 15 20:50 other_dir
drwxr-xr-x  4 root root 4096 Feb 18 00:38 a_dir

The problem is that when I did the rsync I did not notice that I did not have enough space left on the /dir of my local host, and so I ended up with the following error message:

rsync: write failed on "/dir/a_dir/another_dir/some_file": No space left on device

My question is, since during the rsync the /dir on my local host got full I'd like to know if it was only the a_dir that did not made a full rsync. Are the other directories (some_dir and other_dir) ok?

1
  • what is your sorting order ? how can you get some_dir before a_dir in ls -al above ?
    – Archemar
    Commented Apr 14, 2015 at 12:31

1 Answer 1

0

You started with rsync -artz root@remote-host:/dir/* /dir/

So in your scenario you can check if some_dir transfered correctly with rsync -artz root@remote-host:/dir/some_dir /dir/ (note the lack of a trailing / on the source path).

If you get no errors then that directory tree has already completely transferred.

3
  • Sorry, I forgot the ":" in the rsync command. Just fixed the post
    – bulvgo_uh
    Commented Apr 14, 2015 at 11:37
  • what is the expected output in case some_dir transfered correctly?
    – bulvgo_uh
    Commented Apr 14, 2015 at 11:42
  • @bulvgo_uh you'll get no errors if everything has already transferred successfully. Commented Apr 14, 2015 at 12:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .