美文网首页
forever 指令 (备份)

forever 指令 (备份)

作者: 狂足Eroisan | 来源:发表于2020-01-11 18:49 被阅读0次

$ forever --help

  usage: forever [action] [options] SCRIPT [script-options]

  Monitors the script specified in the current process or as a daemon

  actions:

    start              Start SCRIPT as a daemon

    stop                Stop the daemon SCRIPT by Id|Uid|Pid|Index|Script

    stopall            Stop all running forever scripts

    restart            Restart the daemon SCRIPT

    restartall          Restart all running forever scripts

    list                List all running forever scripts

    config              Lists all forever user configuration

    set <key> <val>    Sets the specified forever config <key>

    clear <key>        Clears the specified forever config <key>

    logs                Lists log files for all forever processes

    logs <script|index> Tails the logs for <script|index>

    columns add <col>  Adds the specified column to the output in `forever list`. Supported columns: 'uid', 'command', 'script', 'forever', 'pid', 'id', 'logfile', 'uptime'

    columns rm <col>    Removed the specified column from the output in `forever list`

    columns set <cols>  Set all columns for the output in `forever list`

    cleanlogs          [CAREFUL] Deletes all historical forever log files

  options:

    -m  MAX          Only run the specified script MAX times

    -l  LOGFILE      Logs the forever output to LOGFILE

    -o  OUTFILE      Logs stdout from child script to OUTFILE

    -e  ERRFILE      Logs stderr from child script to ERRFILE

    -p  PATH        Base path for all forever related files (pid files, etc.)

    -c  COMMAND      COMMAND to execute (defaults to node)

    -a, --append    Append logs

    -f, --fifo      Stream logs to stdout

    -n, --number    Number of log lines to print

    --pidFile        The pid file

    --uid            DEPRECATED. Process uid, useful as a namespace for processes (must wrap in a string)

                    e.g. forever start --uid "production" app.js

                        forever stop production

    --id            DEPRECATED. Process id, similar to uid, useful as a namespace for processes (must wrap in a string)

                    e.g. forever start --id "test" app.js

                        forever stop test

    --sourceDir      The source directory for which SCRIPT is relative to

    --workingDir    The working directory in which SCRIPT will execute

    --minUptime      Minimum uptime (millis) for a script to not be considered "spinning"

    --spinSleepTime  Time to wait (millis) between launches of a spinning script.

    --colors        --no-colors will disable output coloring

    --plain          Disable command line colors

    -d, --debug      Forces forever to log debug output

    -v, --verbose    Turns on the verbose messages from Forever

    -s, --silent    Run the child script silencing stdout and stderr

    -w, --watch      Watch for file changes

    --watchDirectory Top-level directory to watch from

    --watchIgnore    To ignore pattern when watch is enabled (multiple option is allowed)

    -t, --killTree  Kills the entire child process tree on `stop`

    --killSignal    Support exit signal customization (default is SIGKILL),

                    used for restarting script gracefully e.g. --killSignal=SIGTERM

                    Any console output generated after calling `forever stop/stopall` will not appear in the logs

    -h, --help      You're staring at it

  [Long Running Process]

    The forever process will continue to run outputting log messages to the console.

    ex. forever -o out.log -e err.log my-script.js

  [Daemon]

    The forever process will run as a daemon which will make the target process start

    in the background. This is extremely useful for remote starting simple node.js scripts

    without using nohup. It is recommended to run start with -o -l, & -e.

    ex. forever start -l forever.log -o out.log -e err.log my-daemon.js

        forever stop my-daemon.js

https://github.com/foreversd/forever

相关文章

  • forever 指令 (备份)

    $ forever --help usage: forever [action] [options] SCRIP...

  • gitlab 备份和还原

    备份说明: gitlab备份分为配置备份和数据备份 执行指令-数据备份 gitlab-backup create ...

  • nodejs服务后台持续运行三种方法

    网上看到的,用了第二种方式OK的,自己备份保存下 一、利用 forever forever是一个nodejs守护进...

  • forever 启动nodeJs (备份)

    forever让nodejs应用后台执行 https://www.cnblogs.com/dreamfine/p/...

  • 面向对象闭包

    面向对象备份指针 // this在事件指令中指向事件源 // that称为备份指针 var that = this...

  • 面向对象闭包

    面向对象备份指针 // this在事件指令中指向事件源 // that称为备份指针 var that = this...

  • tar命令(常用)

    -z或--gzip或--ungzip:通过gzip指令处理备份文件; -x或--extract或--get:从备份...

  • Mysql 备份 — mysqldump 指令

    参与的一个项目需要将mysql数据库整个备份导出,我用百度大法学习了mysql的备份方法。 一. mysqldu...

  • Gitlab 常用指令

    Gitlab 常用指令 1. 启动及停止 2. 查看状态 3. 备份 备份配置 配置文件在路径/etc/gitla...

  • Gitlab

    文件备份指令 ls /Var/opt/gitlab/backups 建议使用shell脚本和crontab定期拷贝...

网友评论

      本文标题:forever 指令 (备份)

      本文链接:https://www.haomeiwen.com/subject/ngdbactx.html