sudo su: unable to resolve host instance-1

Discussion in 'HOWTO-Related Questions' started by adamjedgar, Oct 5, 2018.

  1. adamjedgar

    adamjedgar Member

    On my server, a website was accidently deleted that does not have a backup.
    my only option is to access the snapshot i took 24 hours ago, and copy the wordpress website and database from that back to the users account again.

    this process in google cloud isnt as straight forward as i had hoped. What i decided to do was;
    1. create a new google cloud compute instance from the backup snapshot taken yesterday.
    2. access the uncorrupted directory on the snapshot, copy the wordpress directory and database from it over to the corrupted directory on my production server.

    unfortunately, the only access i seem to have to the snapshot is via google cloud's own ssh in the browser. nothing else is working (i have tried 3 times to setup ssh using putty and it refuses to allow me to log in every time...deleted and recreated ssh keys a dozen times to no avail).

    I am also getting the following error in google cloud ssh "sudo: unable to resolve host instance-1" (where instance-1 is my instance name in google cloud)

    I try to edit the /etc/hosts file however, i get an error when trying to save ..."Error wrting /etc/hosts: Operation not permitted"

    Has anyone got a foolproof method of copying the contents of directory " /home/user/public_html/wordpress" on my snapshot instance and downloading it to my desktop pc using google cloud console ssh?
    Last edited: Oct 5, 2018
  2. adamjedgar

    adamjedgar Member

    I have this sorted...i forgot that i had made the /etc/hosts file immutable so that bloody google cloud wouldnt keep changing my hostname all the flaming time.

Share This Page