Running version 12.04, with Virtualmin/Webmin.
I tried to remove all unnecessary linux-image
files today, since the /boot
partition was full. I followed a guide from Ask Ubuntu, but that resulted in a broken Grub, or something, probably because the command in the suggested guide removed more than it should have.
After several hours I finally managed to install a new kernel image, and created a new Grub, but then I found out that all files in the directory /run
were deleted and probably several other files/directories, that were related to those packages in that directory. I don't know how that could've happened, but I knew there was something strange already when I booted into the Recovery Mode, since I couldn't find any link to the symlink /etc/resolv.conf --> /run/resolvconf/resolv.conf
.
Anyway: I have a complete backup of my filesystem, that was made today with the rsync
command (sudo rsync -ahe ssh ...
, options: --delete --exclude=.gvfs --exclude=/proc --exclude=/dev --exclude=/sys
) .
I tried to restore just the /run
directory, without any luck.
My question is then: can I just replace all files on my server, with the files on my backup-location, with the same rsync
command? (Yes, I know I have to swap "source" and "destination" in the command)
In case that it is possible, is there anything else I should do afterwards?
First, my compliments on having a current backup -- you've hit the 90th percentile of diligence right there. Now to proceed, I would do this:
Mount the root drive to /mnt, e.g.
Create a second mountpoint,
/mnt2
and mount the backup drive to that.Now restore like this
All of the directories I skipped,
dev
,sysfs
,tmp
, etc. should basically be empty.Once the restore completes, try chrooting to
/mnt
and updating grub.Restart
If this doesn't work, then it's time to reinstall and just restore your /home directory & any data files you want.