Today i had a situation with one linux (Debian) machine. The HD retired. As i did not have spare HD at me, i had to transfer the whole backup on the another machine. Here are the steps from the start.
Backup is generated with the following command:
2. After installation is complete go to the /etc folder and type the following command:
4. Go to that location and issue the command:
5. Now you have to restore the backup files from step 2. First remove the existing fstab and grub.cfg that you previously extracted. Then rename the backup files:
Backup is generated with the following command:
su -c 'time /bin/tar --totals -cf - --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=backups . | /bin/gzip -1c | cat > <BACKUP_LOCATION>/tarball.tar.gz'1. Install Linux on the new machine with default settings
2. After installation is complete go to the /etc folder and type the following command:
cp fstab fstab.backup, then go to /boot/grub and type:
cp grub.cfg grub.cfg.backupOptionally backup net rules file
cp /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.backup3. Copy the previously create tarball.tar.gz to a location of your choice.
4. Go to that location and issue the command:
tar -zxvpf tarball.tar.gz -C /This command will override all the files in the root directory.
5. Now you have to restore the backup files from step 2. First remove the existing fstab and grub.cfg that you previously extracted. Then rename the backup files:
mv fstab.backup fstab6. Restart the server and hopefully after the restart you will have a fully restored system on your target machine.
mv grub.cfg.backup grub.cfg
mv /etc/udev/rules.d/70-persistent-net.rules.backup /etc/udev/rules.d/70-persistent-net.rules
Нема коментара:
Постави коментар
Напомена: Само члан овог блога може да постави коментар.