| #!/bin/bash | |
| # | |
| BACKUPDEST="$1" | |
| DOMAIN="$2" | |
| MAXBACKUPS="$3" | |
| if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then | |
| echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]" | |
| exit 1 |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk.
This process is outlined at the Nginx ngx_http_fastcgi_module page manual page.
Go has excellent build tools that mitigate the need for using make.
For example, go install won't update the target unless it's older
than the source files.
However, a Makefile can be convenient for wrapping Go commands with
specific build targets that simplify usage on the command line.
Since most of the targets are "phony", it's up to you to weigh the
pros and cons of having a dependency on make versus using a shell
script. For the simplicity of being able to specify targets that
can be chained and can take advantage of make's chained targets,
aka what i did to get from nothing to done.
note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV