[PLUG] Copying LVM installation to smaller disk

Rich Shepard rshepard at appl-ecosys.com
Tue Jan 27 23:27:22 UTC 2015


On Tue, 27 Jan 2015, Robert K wrote:

> At the same time, I'd like to free up the 2TB drive, since I don't need
> that much space for the Ubuntu installation. The partition structure on
> the 500GB is probably the same (and, perhaps unfortunately, the volume
> names are also the same). So it occurred to me that an application such as
> rsync might be appropriate to copy the files recursively from the large
> drive to the small one. Could anyone give me advice about how to do this
> (preferably avoiding the use of the term "simply...")?

Robert,

   Look at rsync. For automated backups look at dirvish (www.dirvish.org).
Works great, less filling of hard drive space.

   When I want to sync directories between the desktop work station and my
portable what I usually do is work from the portable (the target machine)
and in the destination directory. The syntax:

$ rsync -avz source_machine:/directory .

   The 'a' option means all settings, 'v' means verbose, and 'z' means
compress during transmission. The tricky part is to avoid the terminal '/'
on the source directory; if you put that / there you get a copy of that
directory tree on the destination directory. As the man page explains,

In other words, each of the following commands copies the files in the same
way, including their setting of the attributes of /dest/foo:

               rsync -av /src/foo /dest
               rsync -av /src/foo/ /dest/foo

   In the first line the contents of /src/foo are copied to /dest. In the
second line the contents of /src/foo are copied to /dest/foo; you don't want
that.

Have fun!

Rich




More information about the PLUG mailing list