0

I have an ubuntu lamp server and some other settings and configurations. i can create back up by exporting mysql databases and create copy of php files but how i can create a full clone/backup of all operation system with all configurations/setting/users/... on it?

is there any built in tool or step by step tutorials for doing this?

1 Answers1

1

How to Create Exact Copy of Your Linux Server Disk Drive and Restore it

Use lsblk to locate location of your hard disk.

if your hard disk is located at /dev/sdb then use the following command to make a replica image of your entire disk into an image, which you can restore on

  • Another hard disk
  • USB Flash Drive ( if big enough )
  • Another Linux Server

Copy entire disk over SSH

ssh -p 22 -C root@my-server "dd if=/dev/sdb bs=1024k conv=noerror,sync" | \ dd of=MyServerDisk.iso

This will create an entire copy of your disk to your local machine using -C Compression.

To restore it unto another disk or USB do:

Assuming new disk drive is located at /dev/sda, then do:

dd if=MyServerDisk.iso bs=1024k of=/dev/sda conv=noerror,sync