Mudanças entre as edições de "Migrando VPS"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
Linha 14: Linha 14:
  
 
== Clonando com rsync ==
 
== Clonando com rsync ==
 +
 +
<source lang="bash">
 +
rsync -auHxv –numeric-ids –exclude=/etc/fstab –exclude=/etc/network/* –exclude=/proc/* –exclude=/tmp/* –exclude=/sys/* –exclude=/dev/* –exclude=/mnt/* –exclude=/boot/* –exclude=/root/* root@SRC-IP:/* /
 +
</source>
 +
 +
retirando de https://lowendbox.com/blog/how-to-migrate-a-hosted-server-in-5-easy-steps-with-rsync/
 +
 +
para trocar porta tentar “-e ‘ssh -p 22′”. where “-p 22”

Edição das 13h22min de 12 de agosto de 2018

Clonando com dd

ssh root@remoteIP  "dd if=/dev/sda | gzip - " | dd of=image.gz

convertendo para abrir no Virtualbox

gunzip image.gz 
VBoxManage convertdd image image.vdi --format VDI

retirado de https://serverfault.com/questions/915112/clone-a-remote-linux-server-with-rsync-and-migrate-it-locally-as-virtual-machine

Clonando com rsync

rsync -auHxv –numeric-ids –exclude=/etc/fstab –exclude=/etc/network/* –exclude=/proc/* –exclude=/tmp/* –exclude=/sys/* –exclude=/dev/* –exclude=/mnt/* –exclude=/boot/* –exclude=/root/* root@SRC-IP:/* /

retirando de https://lowendbox.com/blog/how-to-migrate-a-hosted-server-in-5-easy-steps-with-rsync/

para trocar porta tentar “-e ‘ssh -p 22′”. where “-p 22”