Hi,
I am more familiar with windows so far. There I regularly use Ghost to backup my OS partition.
Is there anything similar on the Linux side?
I have used “dd”, but this does not offer to search the file and restore dedicated files I probably have lost.
I can use “tar”, but it is not on a partition-level.
Since the os is on /dev/sda2 and home is on /dev/sda3 I could use “tar” to backup “/” (but did not find a parameter to exclude /home). And in a second tar to backup “/home”.
How to restore from a tar is a second question on a running system?
Can anyone give a usable description how to backup and restore a Linux?
In Unix/Linux normaly the disk (partition) is hiden away from the user (and in many ways also from root) as much as possible. The fact that somewhere inside the Unified directory tree a boundary between disk partitions is crossed is not seen as very important to the end-user. Thus it is not ver strange that all sorts of tools (being it cp, tar, rsync, …) have no options considering doing things on partitions. So only the system manager, who as root created the mounts) knows that when he wants to tar all files on a particular partition, he has to do a tar on /home e.g.
dd is a tools that works with disk blocks, addresses very hard. But as such does not know anything of the structure within (one or more) disks blocks it is asked to copy. But when you dd a complete partition to another partition (of the same size) your complete fs is there and when you mount it somewhere (e.g. /mnt/backupofhomepartition/) you can then find all directories/files).
Thus when you say: “dd … this does not offer to search the file and restore dedicated files I probably have lost”, that is not completely true. It depends on what you did with the copy.
When you say that tar, etc. are not partition consious, that is true because (I think contrary to the OS you mentioned, but I am a big noob on MS windows) that is the intention of the mounting of file systems in Unix/Linux.
Restoring individual files from a so called tar file (often decorated by the characters .tar at the end of the filename) is simply done using tar. See the man page.
System Rescue CD includes offline ghost type tools to work on partitions and make images (PartImage).
I have used “dd”, but this does not offer to search the file and restore dedicated files I probably have lost.
You’ld copy the filesystem image you made, into a fresh disk partition (or loopback mount the file analagous to loopback mounting ISO files), fsck(8) & mount(8) it, then use normal tools to recover what you lost.
I can use “tar”, but it is not on a partition-level.
Since the os is on /dev/sda2 and home is on /dev/sda3 I could use “tar” to backup “/” (but did not find a parameter to exclude /home). And in a second tar to backup “/home”.
How to restore from a tar is a second question on a running system?
You need to find articles on web, it’d be unrealistic for anyone to try and type something in. tar(1) is intended for making tape archives, it was never a preferred heavy duty UNIX backup system (which had dump(8) / restore(8) as well as proprietary tools).
If you want to make a spare copy of all the system files, then rsync(1) will do the job very simply, and let you update later eg) rsync -Sax.
Avoid the enterprise solutions Amanda, Bacula as they offer too much and over-kill features will confuse you. Clonezilla also has variants for mass duplication of works stations in enterprise, rather than focus on your “simple” requirements.