Score:0

service file disappeared in Google CLoud VM

vn flag

I have a Google VM micro instance running Ubuntu 20.04. Last week on this VM, I set up a systemd service that runs a python script. I created the service file (say my_fancy_service.service) as /lib/systemd/system/my_fancy_service.service and inside this service file, it calls /usr/bin/python3 /usr/local/bin/my_fancy_service.py. Everything works fine as expected.

But today I came back to this server and the service file /lib/systemd/system/my_fancy_service.service is just gone. All my other files are there: my executable python scripts and all my log files in /var/log/my_fancy_service/*.log. But my service file disappeared. Obviously I don't want this: this service should be a perpetually running service.

Is there any reason why my service file would have disappeared? Is this some issue when the VM reboots or somehow gets recreated? What could have caused this and how do I prevent it?

Score:1
st flag
Google does not delete files inside vm instances. You may want to check the logs to see what happened when you left your instance. Be sure you don't have any start-up scripts that may have deleted data.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.