Skip to contentSkip to conversation

"resume" cp/mv

DISCUSSION urgrue 7 participants 8 messages Feb 6, 2006 – Feb 8, 2006

lore
Share & tools
lore

urgrue

author
#0 lore raw

Anyone know of any trick to make mv/cp support some form of crash-recovery?

The problem is, if I'm moving a huge directory/file, and the transfer fails, there is absolutely no way to continue where I left off. This is awfully primitive.

The only way I can think of is to zssh into my own localhost and use rz/sz, or the same via ftp, but this seems like a pathetic kludge, and even those dont work very well with large directories full of files.

#1 lore raw
Quoted 1 line · urgrue

Anyone know of any trick to make mv/cp support some form of crash-recovery?

Use rsync.

thornton

#2 lore raw
In reply to urgrue

Sounds like a good match for rsync...

Quoted 6 lines · urgrue
Quoted 6 lines

Anyone know of any trick to make mv/cp support some form of crash-recovery?

The problem is, if I'm moving a huge directory/file, and the transfer fails, there is absolutely no way to continue where I left off. This is awfully primitive.

Quoted 7 lines
Quoted 7 lines

The only way I can think of is to zssh into my own localhost and use rz/sz, or the same via ftp, but this seems like a pathetic kludge, and even those dont work very well with large directories full of files. -
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

End of included message

Signature · 5 lines
+--------------------------+------------------------------+
| Tim Walberg              | [email protected]      |
| 830 Carriage Dr.         | www.mindspring.com/~twalberg |
| Algonquin, IL 60102      |                              |
+--------------------------+------------------------------+
#3 lore raw
In reply to urgrue
Quoted 10 lines · urgrue

Anyone know of any trick to make mv/cp support some form of crash-recovery?

The problem is, if I'm moving a huge directory/file, and the transfer fails, there is absolutely no way to continue where I left off. This is awfully primitive.

The only way I can think of is to zssh into my own localhost and use rz/sz, or the same via ftp, but this seems like a pathetic kludge, and even those dont work very well with large directories full of files.

Maybe you want to try cpio? Less likely to fail then mv or cp on large trees. As with mv or cp you skip files that already exist, no need to start over.

--
Scott

#4 lore raw
In reply to urgrue

I've used 'cp -u' for a similar problem (where I really am updating parallel --backup-- directories of huge graphics files).

Mark Hansel

Quoted 10 lines · urgrue

Anyone know of any trick to make mv/cp support some form of crash-recovery?

The problem is, if I'm moving a huge directory/file, and the transfer fails, there is absolutely no way to continue where I left off. This is awfully primitive.

The only way I can think of is to zssh into my own localhost and use rz/sz, or the same via ftp, but this seems like a pathetic kludge, and even those dont work very well with large directories full of files. -

#5 lore raw

I have also used 'cp -u'.......but rsync is better match for it.

PK

Quoted 13 lines · On 2/6/06, [email protected] <[email protected]> wrote:

I've used 'cp -u' for a similar problem (where I really am updating parallel --backup-- directories of huge graphics files).

Mark Hansel

Quoted 6 lines · urgrue

Anyone know of any trick to make mv/cp support some form of crash-recovery?

The problem is, if I'm moving a huge directory/file, and the transfer fails, there is absolutely no way to continue where I left off. This is awfully primitive.

Quoted 9 lines
Quoted 4 lines

The only way I can think of is to zssh into my own localhost and use rz/sz, or the same via ftp, but this seems like a pathetic kludge, and even those dont work very well with large directories full of files. -

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Regards,
Prosenjit Kundu

author
#6 lore raw

rsync certainly helps with large directories, so thats at least a partial solution, but it doesnt resume an interrupted transfer of an individual file, does it?

Quoted 36 lines · Prosenjit Kundu

I have also used 'cp -u'.......but rsync is better match for it.

PK

Quoted 13 lines · On 2/6/06, [email protected] <[email protected]> wrote:

I've used 'cp -u' for a similar problem (where I really am updating parallel --backup-- directories of huge graphics files).

Mark Hansel

Quoted 6 lines · urgrue

Anyone know of any trick to make mv/cp support some form of crash-recovery?

The problem is, if I'm moving a huge directory/file, and the transfer fails, there is absolutely no way to continue where I left off. This is awfully primitive.

Quoted 9 lines
Quoted 4 lines

The only way I can think of is to zssh into my own localhost and use rz/sz, or the same via ftp, but this seems like a pathetic kludge, and even those dont work very well with large directories full of files. -

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Regards,
Prosenjit Kundu
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
Quoted 1 line · urgrue

rsync certainly helps with large directories, so thats at least a partial solution, but it doesnt resume an interrupted transfer of an individual file, does it?

rsync compares file size and timestamp(s?) and if they are the same it presumes the contents are the same. If they differ it then reads the file and generates checksums for each chunk of the file, compares the checksums (much faster network load than sending the data) and only updates the chunks that don't have a matching checksum. This implies that it does not resend (or rewrite) the bulk of the file that's consistent, but that it has to read all of both the source and destination file. If you're rsync'ing over a network the performance is reasonably close to resuming where it left off but it doesn't depend on maintaining the state of an aborted copy.

Note: Options exist to override or tune several of the details above, but I believe what I described is essentially the normal rsync behavior.

--
Jeff Woods <[email protected]>