1

I have been following this tutorial on Ubuntu forums for backup/restore of ubuntu server

I have a dedicated server and in case I have to restore the whole server on a new machine, I'm practicing using a virtual machine in vmware.

I've managed to restore all the files by doing an untar of the backup. However I can't get apache to start:

could not reliably determine the server's fully qualified domain name using 127.0.1.1 for servername

and

The Apache error log may have more information

The problem is that there are no logs since I've excluded them from the backup.

Do I need to first install Apache and then untar the backup ?

Is this the proper way to restore the server ? I have some doubts because things like ip address and host name would be different if I create a new dedicated server, so there is potentially a significant number of files that would need to be updated. Is there a recommended way to do that?

5
  • It depends what you backed up. When I backup my server I only keep the actual pages, not the configuration, because the config will be different.
    – Tim
    Aug 17, 2014 at 16:35
  • I've excluded these : --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz
    – Sam
    Aug 17, 2014 at 16:46
  • I would extract them to a directory that you make, and then copy across the ones that you need, rather than a direct extraction.
    – Tim
    Aug 17, 2014 at 16:47
  • I could do that easily with files such as the ones in /var/www. However, I can't remember all the configuration files that I might have configured such as the ones for apache, ufw, etc.... That's why I though I'd just copy everything over.
    – Sam
    Aug 17, 2014 at 16:51
  • Well if you've just reinstalled, try it. If it fails, reinstall again, and then just copy /var/www ?
    – Tim
    Aug 17, 2014 at 16:52

1 Answer 1

0

I've manually created the log directory and next time I attempted to start Apache, the error.log file was created.

From there, I could find out that there was no entry in the /etc/hosts file for the new machine's name. I created it and now Apache runs fine.

I'm still wondering if this the proper way to set up a new server out of a backup tar ?

Not the answer you're looking for? Browse other questions tagged .