clone a disk
kmk at sanitarium.net
Fri Jul 17 19:33:51 UTC 2015
-----BEGIN PGP SIGNED MESSAGE-----
I would add --numeric-ids and --itemize-changes. Up to you if you
need --xattrs or --acls.
Also, I prefer to do backups by filesystem so I would add
- --one-file-system and run one rsync per filesystem. This means you
don't have to exclude things like /proc and /dev and any random thing
that isn't normally connected but sometimes is but it also means you
have to list all the filesystems that you do want to backup.
On 07/17/2015 02:21 PM, Simon Hobson wrote:
> Thierry Granier <th.granier at free.fr> wrote:
>> i have a machine A with 2 disks 1 et 2 running Debian Jessie on 1
>> is the system and the boot and the swap on 2 different partitions
>> like /home /opt ETC.....
>> i have a machine B with 1 disk running kali-linux and 100G free
>> Can i clone the disk 1 of machine A on the 100G free on machine B
>> with rsync?
>> If it is possible, how to do that?
> Yes, it's easy to do, I do that for the primary backup on all my
> Lets say you are doing it from machine a, and backing up to
> directory /backup_a on b. Logged in as root then you could do it
> with : rsync -avH --delete --exclude-from=/etc/rsync_excludes /
> root at b:/backup_a/ -a means "archive" and sets several parameters, v
> simply makes things verbose, H means correctly handle hard linked
> files. --delete means delete files from the destination that have
> been removed from the source, and --exclude-from specifies a file
> containing a list of exclusions to omit. You need to exclude a
> bunch of stuff, things like /dev/*, /proc/*, /sys/*, and so on. You
> can also exclude things you don't want to copy such as log files.
> However, this is interactive and also needs permission to log in as
> root on the destination (which I block for security). Far better,
> for regular backups, to use rsync as a service on the destination
> which only needs a few more steps.
> Also note that trailing "/"s on source and destination are
> significant. root at b:/backup_a/ will produce different results to
> root at b:/backup_a !
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. Kevin at FutureQuest.net (work)
Orlando, Florida kmk at sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the rsync