0

I had a cp job of 5 GB fail on me because of file system full. After I resized the file system, I tried to resume a single file copy with rsync.

$ rsync --progress /source/bigfile ./bigfile

But it's weird, it seems to not realize that the file is already there, it seems to start over from scratch. But doesn't say where it puts any file.

If I move the bigfile out of the way and just start rsync all over, the file never shows up!

$ mv bigfile bigfile-away
$ rsync --progress /source/bigfile ./

and again rsync seems to do the copying but I never see the file appear.

This is weird!

1 Answer 1

2

You are copying between two parts of the same system (or at least, that's how it looks to rsync). This disables most of the optimising functionality of rsync and it reverts to being not much more than cp.

If you can guarantee that the file has not changed you can use --append. For interruptible copies you may want --partial

You probably want to use --times (-t) to retain the file timestamps, and it sounds like you want to use --inplace (which is implied by the --append flag).

rsync -tvP --append /source/bigfile ./bigfile

When copying a file, rsync usually writes it to a temporary filename and then moves it instantaneously to the correct filename. The filename begins with a dot so it's classed as hidden; you can see it with ls -A. Also, without the --partial (part of -P) flag, any incomplete file is deleted from the target.

You must log in to answer this question.

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