Re: DD To a Smaller Partition

2011-01-17 Thread T o n g
On Mon, 10 Jan 2011 02:53:09 -0500, shawn wilson wrote:

 btw, the best cp command for the job is cp -Ra (a for archive - maintain
 all permissions - do this as root to maintain uid/gid of other
 users/groups).

Thanks for pointing out why cp -r is unacceptable. 

Just my added 2c...

the -R is actually not necessary once the -a is specified. I.e., cp -a 
is all that you need.

-- 
Tong (remove underscore(s) to reply)
  http://xpt.sourceforge.net/techdocs/
  http://xpt.sourceforge.net/tools/


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/ih1qgf$fih$1...@dough.gmane.org



Re: DD To a Smaller Partition

2011-01-13 Thread Adrian Levi
On 10 January 2011 05:21, Hal Vaughan h...@halblog.com wrote:

Is there a way to copy an image of just the files from one drive to another?  
For example, an intelligent DD that won't copy unused sectors, or will create 
an archive of just the files?

Is there a reason why dump and restore won't fill the bill?

Adrian

-- 
24x7x365 != 24x7x52 Stupid or bad maths?
erno hm. I've lost a machine.. literally _lost_. it responds to
ping, it works completely, I just can't figure out where in my
apartment it is.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktin3x_vedfajhea1ct8msfru8jn-3t44sqoqs...@mail.gmail.com



Re: DD To a Smaller Partition

2011-01-12 Thread Jesús M. Navarro
Hi, Hugo:

On Monday 10 January 2011 21:10:51 Hugo Vanwoerkom wrote:
 Jesús M. Navarro wrote:
  Hi, Hal:
 
  On Sunday 09 January 2011 20:21:22 Hal Vaughan wrote:
  I have a 10 GB partition that is nowhere near full, less than 5 GB of
  data on it (far less).  Unfortunately, the partition I'd like to copy it
  to is 5 GB.  I can do rsync -av but normally I'd use DD.  Is there a
  way to copy an image of just the files from one drive to another?  For
  example, an intelligent DD that won't copy unused sectors, or will
  create an archive of just the files?
 
  dd won't do that but partimage is probably the intelligent dd you are
  looking for.

 But partimage will no restore to a smaller artition

I thought you could do that (it's a long time since I used partimage last 
time) but it seems you are right.  There's a workaround, though: you first 
restore to a partition big enough and the you use parted to reduce it to 
lower limits.

Cheers.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201101122308.00092.jesus.nava...@undominio.net



Re: DD To a Smaller Partition

2011-01-10 Thread Jesús M. Navarro
Hi, Hal:

On Sunday 09 January 2011 20:21:22 Hal Vaughan wrote:
 I have a 10 GB partition that is nowhere near full, less than 5 GB of data
 on it (far less).  Unfortunately, the partition I'd like to copy it to is 5
 GB.  I can do rsync -av but normally I'd use DD.  Is there a way to copy
 an image of just the files from one drive to another?  For example, an
 intelligent DD that won't copy unused sectors, or will create an archive of
 just the files?

dd won't do that but partimage is probably the intelligent dd you are 
looking for.

Anyway, why do you want to avoid rsync -a, cp -r or the likes?

Cheers.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201101101443.40331.jesus.nava...@undominio.net



Re: DD To a Smaller Partition

2011-01-10 Thread Hugo Vanwoerkom

Jesús M. Navarro wrote:

Hi, Hal:

On Sunday 09 January 2011 20:21:22 Hal Vaughan wrote:

I have a 10 GB partition that is nowhere near full, less than 5 GB of data
on it (far less).  Unfortunately, the partition I'd like to copy it to is 5
GB.  I can do rsync -av but normally I'd use DD.  Is there a way to copy
an image of just the files from one drive to another?  For example, an
intelligent DD that won't copy unused sectors, or will create an archive of
just the files?


dd won't do that but partimage is probably the intelligent dd you are 
looking for.





But partimage will no restore to a smaller artition

Hugo


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/igfp4b$pr...@dough.gmane.org



DD To a Smaller Partition

2011-01-09 Thread Hal Vaughan
I have a 10 GB partition that is nowhere near full, less than 5 GB of data on 
it (far less).  Unfortunately, the partition I'd like to copy it to is 5 GB.  I 
can do rsync -av but normally I'd use DD.  Is there a way to copy an image of 
just the files from one drive to another?  For example, an intelligent DD that 
won't copy unused sectors, or will create an archive of just the files?


Thanks!



Hal

--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/abf06b01-fe96-44da-b00d-fb16ee6e8...@halblog.com



Re: DD To a Smaller Partition

2011-01-09 Thread Robert Blair Mason Jr.
On Sun, 09 Jan 2011 14:21:22 -0500
Hal Vaughan h...@halblog.com wrote:

 I have a 10 GB partition that is nowhere near full, less than 5 GB of data on 
 it (far less).  Unfortunately, the partition I'd like to copy it to is 5 GB.  
 I can do rsync -av but normally I'd use DD.  Is there a way to copy an 
 image of just the files from one drive to another?  For example, an 
 intelligent DD that won't copy unused sectors, or will create an archive of 
 just the files?
 
 
 Thanks!
 
 
 
 Hal
 
 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: 
 http://lists.debian.org/abf06b01-fe96-44da-b00d-fb16ee6e8...@halblog.com
 

Why is cp -r /mnt/asdf /mnt/jkl unacceptable?  When in doubt, use brute force.  
As long as the partitions are both formatted and mountable, it should work (and 
be faster then finding a smart dd, learning how to use it, and running it :D).

-- 
rbmj


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110109144531.06db8...@blair-laptop.mason



Re: DD To a Smaller Partition

2011-01-09 Thread Andrew M.A. Cater
On Sun, Jan 09, 2011 at 02:21:22PM -0500, Hal Vaughan wrote:
 I have a 10 GB partition that is nowhere near full, less than 5 GB of data on 
 it (far less).  Unfortunately, the partition I'd like to copy it to is 5 GB.  
 I can do rsync -av but normally I'd use DD.  Is there a way to copy an 
 image of just the files from one drive to another?  For example, an 
 intelligent DD that won't copy unused sectors, or will create an archive of 
 just the files?
 
 
 Thanks!
 
 
 
 Hal
 
 --
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: 
 http://lists.debian.org/abf06b01-fe96-44da-b00d-fb16ee6e8...@halblog.com

change to where you want the data to go to.

rsync -pavz --delete source directory .

If the rsync fails, you can always restart it. Works for me and is quick.

All the best,

AndyC


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/2011010932.ga2...@galactic.demon.co.uk



Re: DD To a Smaller Partition

2011-01-09 Thread Stefan Monnier
 I have a 10 GB partition that is nowhere near full, less than 5 GB of data
 on it (far less).  Unfortunately, the partition I'd like to copy it to is
 5 GB.  I can do rsync -av but normally I'd use DD.  Is there a way to copy
 an image of just the files from one drive to another?

In the case where the 10GB indeed has mostly only files in its lower
5GB, it might be worthwhile to do something like:

   resize2fs /dev/foo 4G

and then to `dd' the first 4GB only.  But in all likelyhood cp -a,
tar, or rsync will be more efficient.


Stefan


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/jwvfwt1z640.fsf-monnier+gmane.linux.debian.u...@gnu.org



Re: DD To a Smaller Partition

2011-01-09 Thread shawn wilson
On Sun, Jan 9, 2011 at 2:21 PM, Hal Vaughan h...@halblog.com wrote:
 I have a 10 GB partition that is nowhere near full, less than 5 GB of data on 
 it (far less).  Unfortunately, the partition I'd like to copy it to is 5 GB.  
 I can do rsync -av but normally I'd use DD.  Is there a way to copy an 
 image of just the files from one drive to another?  For example, an 
 intelligent DD that won't copy unused sectors, or will create an archive of 
 just the files?


afaik, as of a year ago, there is no ghost like dd. there was
ghost4linux which looked like a front end to dd | gzip |
nfs/scp/ftp/etc

that said, i don't know why you wouldn't just use rsync as using the
feature in ghost that creates a dynamic image size isn't really
admissible in court anyway :)

btw, the best cp command for the job is cp -Ra (a for archive -
maintain all permissions - do this as root to maintain uid/gid of
other users/groups).


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/aanlktinfydu5=mxm=om+qxsuixxxnkerukxfoih4o...@mail.gmail.com