Fault Backup try
I`m a new Linux user, I have tried to backup the boot partition using " tar " command as below :
# tar -xf /dev/sda5 /mnt/boot_backup unfortunately, after reboot I got the " grup rescue " shell & when tried to list any file system ( ls (hd0,msdos5)/grup2) I`m getting an error message " unknown filesystem" finally I tried to extract the /mnt/boot_backup using Centos 7 DVD using the following command : # tar -xvf /mnt/boot_backup /dev/sda5 but got the following error tar: At beginning of tape, quitting now tar: Error is not recoverable: exiting now Please advice |
Welcome. An unfortunate introduction to Linux.
Whilst getting an understanding of backups is exemplary, I see several problems: - as per your second command, the "-x" option is to extract an already existing tar archive. Your first command should have used "-c" (create) instead. - it is usually unnecessary (and often dangerous) to use device nodes directly - use mountpoint(s) for safety. - tar archives are files - you need to specify the filename each time. Perhaps something like the following would do what you wanted - note the order of parameters Code:
tar -cf /mnt/boot_backup/boot_backup.tar /boot Code:
df -hT |
1 Attachment(s)
Thanks Dear for your replay
First of all, I had already executed the " tar " command with " cf " option not as mentioned in my previous post. secondly, I have ran these two commands as per your advice and got the attached result. Is it mean as you told that the device node for boot partition had been emptied ??? |
In addition to what syg00 posted the correct syntax for tar is:
tar -cf /destination/file files_to_be_tarred Which means you over wrote part of /dev/sda5 with the contents of /mnt/boot_backup. So what was sda5? Can you post the output of the command lsblk? |
That output looks like the on-disk system, and doesn't show much. But it did boot.
As well as the "lsblk" output, let's see this Code:
sudo mount /dev/sda5 /mnt |
Dear SYG00 & Michealk
Thank for you interest , but unfortunately I have installed a fresh Centos 7image . Can you please guide me to creat system state backup or restore point (I'm MCSE so may be these are microsoft expressions ) |
there is no "restore point" in the linux world - or at least it is not similar to the restore point used by MS-Windows.
You can use a lot of different tools to back up your system, but actually you may need to boot another OS (livecd) to be able to save the content of the root partition. dd can be used to do that, but without knowing your system (what to backup, where to) we cannot give you better answer. |
I forgot to tell that I'm using CentOS 7
|
no, you did not forget, that was mentioned in the first post
|
All times are GMT -5. The time now is 05:39 AM. |