1.0.4 • Published 3 years ago

m122_ap18c_autobackup_toldo_severin v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

M122 AP18c AutoBackup Toldo Severin

Guide for the project M122 AP18c AutoBackup Toldo Severin

Installation

1) Install NPM (if not already done) 2) npm install -g m122_ap18c_autobackup_toldo_severin 3) which autobackup Example: /usr/local/bin/autobackup 4) node /path/to/autobackup Example: node /usr/local/bin/autobackup *Alternatively you can add it to PATH

Configuration

How to configure M122 AP18c AutoBackup Toldo Severin

Arguments

List of possible arguments. They can be passed via a config file, as command line arguments or both.

  • default config file location: /USER_HOME/autobackup-config.json
  • commandline arguments overwrite config files
  • if --configFile argument is set, default config file will be ignored
  • Config files must be valid json

Note: Command line arguments will overwrite config file arguments.

ArgumentRequiredDescriptionExample ValueNotes
--ftpHosttrueFTP host addressftpHost.com
--ftpUsertrueFTP usernameftpUser
--ftpPasswordtrueFTP passwordftpPassword
--ftpBackupLocationtrueBackup location on the FTP server/ftpBackupLocation
--emailServicefalseE-Mail service to be used (ex. gmail)gmailE-Mail are only sent if all email arguments are set
--emailUserfalseE-Mail usernameemailUser@gmail.comE-Mail are only sent if all email arguments are set
--emailPasswordfalseE-Mail passwordemailPasswordE-Mail are only sent if all email arguments are set
--emailTofalseE-Mail recipientemailTo@gmail.comE-Mail are only sent if all email arguments are set
--filetrueFile to backup/path/to/file.txt
--logFilefalseFile to log to/path/to/file.log
--configFilefalseNon-Default Config file/path/to/file.jsonIf set, default config file will be ignored

File

Config file template

{
	"ftpHost": "ftpHost.com",
	"ftpUser": "ftpUser",
	"ftpPassword": "ftpPassword",
	"ftpBackupLocation": "/ftpBackupLocation",
	"emailService": "gmail",
	"emailUser": "emailUser@gmail.com",
	"emailPassword": "emailPassword",
	"emailTo": "emailTo@gmail.com",
	"file": "/path/to/file.txt",
	"logFile": "/path/to/file.log"
}

Example Commands

Command that specifies all arguments via command line argument

node autobackup --ftpHost="ftpHost.com" --ftpUser="ftpUser" --ftpPassword="ftpPassword" --ftpBackupLocation="/ftpBackupLocation" --emailService="gmail" --emailUser="emailUser@gmail.com" --emailPassword="emailPassword" --emailTo="emailTo@gmail.com" --file="/path/to/file.txt" --logFile="/path/to/file.log"

Command that specifies custom config file and overwrites some arguments

node autobackup --configFile=/path/to/config/file/autobackup.json --emailTo="emailUser@gmail.com" --file="/path/to/file.txt"