How Can I Recover My Files From Full Disk (Even Can't Connect To SSH) on Google Cloud

31 views
Skip to first unread message

Emre Tosunkaya

unread,
Dec 9, 2019, 9:21:21 AM12/9/19
to Google App Engine
I'm having trouble connecting to ssh because my disk is 100% full due to logs (it doesn't connect at all because it's full) and I ask for help.

If you ask how the disk is full: cyberpanel is available, modsecurity logs filled 50gb of disk every second. i can no longer connect to browser ssh, sftp. it's only accessible from google cloud shell. I rebooted the instance a few times and opened a little space at that time. There is only 1 site available and only 3gb in 10gb limited package. I looked at sftp, I have 36GB unnecessary log.

I don't know how to connect to sftp as root. I created a private key for root from putty and defined it in google cloud, I tried to enter it, it doesn't allow. my files remained inside.

gcloud shell only provides access to 5gb and 1 hour temporary space, you can enter commands but you can not access files even if root.

I have three chances: doing operations in gcloud shell, connecting to sftp with root and deleting logs (if I can do this, I can set cron and set the auto-deletion of logs), I can enlarge the disk but I couldn't do it on 10gb before. After increasing the disk you need to resize the disk from gcloud shell.

I have also restarted the instance, ip changed and network settings reset the http https I reopened permission. I can't enter sftp where I used to be a user.

I'd appreciate it if any helper with the information. Thanks.

server management is very demanding thing.

Emre Tosunkaya

unread,
Dec 9, 2019, 4:29:23 PM12/9/19
to Google App Engine
SOLUTION: i recovered my files by unattaching the disk from original instance than mount to new instance as ADDITIONAL DISK. then mount with ssh command and set directory for additional disk (check did u mount or not)

connect as root to sftp (i use filezilla) then recover your files.

my disk was full because of litespeed logs. i deleted the logs then mounted to original instance. it's working well and normal.

9 Aralık 2019 Pazartesi 17:21:21 UTC+3 tarihinde Emre Tosunkaya yazdı:
Reply all
Reply to author
Forward
0 new messages