Saturday 1 November 2014

Rsync + Screen

More on copying, this time on the linux common line.I'm in the process of removing some smaller drives from my unRAID array and converting the remaining drives to XFS. To do this requires a good deal of data shuffling.

It's best to do this directly on the unRAID OS so as to remove any network operations. I'd never liked using Midnight Commander so decided a cp operation was required. However, two problems; cp doesn't show progress and doing this over ssh is risky as if the connection or client system dies, the copy operation dies.


I'd never used rsync or screen before but this combo addresses both issues. Rsync has a --progress flag that shows file by file copies along with transfer speed etc. while Screen allows one or more command line sessions to run on the server and, crucially, will continue to run even if the client ssh connection breaks.

Here's the tutorials i used to set up and get started with both;

Screen;
http://lime-technology.com/wiki/index.php/Configuration_Tutorial#Install_Screen
http://www.comentum.com/rsync.html

Rsync
http://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/

The only trouble I had was if I attempted to run two simultaneous rsync sessions (between two different sets of disks), my system didn't like this at all and would crash with a kernel error. Thankfully, rsync just picks up where it left off.


No comments: