Forrest logo
back to the pm2 tool

pm2:tldr:4c213

pm2: Resurrect previously dumped processes.
$ pm2 resurrect
try on your machine

The pm2 resurrect command is used in the PM2 process manager to resume monitoring and managing processes that were previously managed by PM2.

PM2 is a process manager for Node.js applications that allows you to run and manage multiple processes in the background. It provides features such as process monitoring, automatic restarts, and log management.

The resurrect command is used to bring back to life any processes that were previously managed by PM2 but got terminated or stopped due to a system restart, crash, or manual intervention.

By executing pm2 resurrect, PM2 scans its process list file (usually located at ~/.pm2/pm2.pid) and restores the previously managed processes along with their configurations. It restarts them and resumes monitoring and managing their status.

This command is particularly useful when you want your application processes to automatically start and resume their management by PM2 after a system reboot or similar events.

It's important to note that in order for pm2 resurrect to work, you need to have PM2 installed and running on the system. Additionally, the process list file should be intact and accessible to PM2 for successful resurrection.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the pm2 tool