Difference between revisions of "Backup"

From Linuxintro
imported>ThorstenStaerk
m
imported>ThorstenStaerk
Line 1: Line 1:
 
To make your backup effective, you need to know which are the files that you do not want to loose when your computer goes bye-bye. Keep all this files beneath the folder /root/archiv. Yes all. Your pictures and your texts and your secret passwords. Now go and buy a USB disk. Mount the disk on /mnt/usb. Now [[install]] [[Unison]], here is an example for SUSE Linux:
 
To make your backup effective, you need to know which are the files that you do not want to loose when your computer goes bye-bye. Keep all this files beneath the folder /root/archiv. Yes all. Your pictures and your texts and your secret passwords. Now go and buy a USB disk. Mount the disk on /mnt/usb. Now [[install]] [[Unison]], here is an example for SUSE Linux:
 
  yast -i unison
 
  yast -i unison
Now all that is left to do is to keep /root/archiv and your USB disk on /mnt/usb in sync:
+
After some months, you have made changes to your files and you need to synchronize your hard disks. You can do it like this:
 
  unison /root/archiv /mnt/usb/archiv
 
  unison /root/archiv /mnt/usb/archiv
 +
And it will look about like that:
 +
[[Image:snapshot-unison.png]]
  
 
= Take an image of your computer =
 
= Take an image of your computer =

Revision as of 09:28, 16 October 2009

To make your backup effective, you need to know which are the files that you do not want to loose when your computer goes bye-bye. Keep all this files beneath the folder /root/archiv. Yes all. Your pictures and your texts and your secret passwords. Now go and buy a USB disk. Mount the disk on /mnt/usb. Now install Unison, here is an example for SUSE Linux:

yast -i unison

After some months, you have made changes to your files and you need to synchronize your hard disks. You can do it like this:

unison /root/archiv /mnt/usb/archiv

And it will look about like that: Snapshot-unison.png

Take an image of your computer

To store a backup of your computer on another computer in the network, use

tar -cv -f- $(ls -1 | grep -Ev "proc|sys|tmp|media|mnt") | ssh root@target "cat >/root/slash.tar"

This stores a backup of your computer, but not /proc, /sys, /tmp, /media and /mnt on the computer target in /root/slash.tar.