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

De MochilaWiki
Ir para navegaçãoIr para pesquisar
 
Linha 16: Linha 16:
  
 
<source lang="bash">
 
<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:/* /
+
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>
 
</source>
  

Edição atual tal como às 14h47min 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”