LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Backup of complete linux system (https://www.linuxquestions.org/questions/linux-newbie-8/backup-of-complete-linux-system-4175448644/)

eprabhat08 02-05-2013 01:20 AM

Backup of complete linux system
 
Hi,

I am using Ubuntu 12.01. I want to create Complete System Backup with data stored in /opt/lampp/.

Please help me to solve the problem.

Thanks!
Prabhat

venkatkoorapati 02-05-2013 01:34 AM

Hi

you can use this command to take the back up all the devices

dd if=/dev/DEVICE_TO_BACKUP of=/mnt/DEVICE/filename

example:

dd if=/dev/sda1 of=/mnt/external_drive
dd if=/dev/sda2 of=/mnt/external_drive
dd if=/dev/sda3 of=/mnt/external_drive

Thanks
venkat

jsaravana87 02-05-2013 07:36 AM

You can use rsync to sync the data to any external storage medium

rsync Incremental backup

rsync --zavi root@serverip:/opt/lampp /destination mountpoint

Habitual 02-05-2013 09:14 AM

Quote:

Originally Posted by eprabhat08 (Post 4884600)
Hi,

I am using Ubuntu 12.01.

you sure?

terminal >
Code:

lsb_release -drc
https://help.ubuntu.com/community/BackupYourSystem

suicidaleggroll 02-05-2013 10:18 AM

Here's the script I use to back up my system at home
Code:

#!/bin/bash

if [[ ! -e /home/verify ]]; then
  echo "raid not found, skipping backup"
elif [[ ! -e /media/backups/home/verify ]]; then
  echo "backup drive not found, skipping backup"
else
  /usr/bin/rsync -aAXv --progress --delete /* /media/backups/ --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/.gvfs,/var/lib/ntp/proc/*}
  echo ""
  echo ""
  echo "Backup finished $(date)"
fi

"verify" is just an empty file placed in a certain location on the drive. Checking for its existence is an easy way to ensure the drive is currently mounted and accessible in the expected location. Since my /home is located on a separate drive from the rest of the system, the first check is important since if the raid isn't mounted at /home for some reason, the --delete flag in rsync would wipe out the backup of everything on the raid. The second check is important because you don't want to back up the system to the location where the backup drive SHOULD be mounted, if it's not actually mounted there.

I run this backup nightly around 4am. Since it's an incremental backup, it only takes ~8 minutes to comb through the full 2.2 TB of data on the machine and sync the changes to the external drive.

eprabhat08 02-05-2013 11:32 PM

Thanks to all. It is very help for me!!!


All times are GMT -5. The time now is 07:31 PM.