m122_ap18c_autobackup_toldo_severin
v1.0.4
Published
AutoBackup
Downloads
9
Readme
M122 AP18c AutoBackup Toldo Severin
Guide for the project M122 AP18c AutoBackup Toldo Severin
Installation
- Install NPM (if not already done)
npm install -g m122_ap18c_autobackup_toldo_severin
which autobackup
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.
| Argument | Required | Description | Example Value | Notes | |---------------------|----------|---------------------------------------|---------------------|-----------------------------------------------------| | --ftpHost | true | FTP host address | ftpHost.com | | | --ftpUser | true | FTP username | ftpUser | | | --ftpPassword | true | FTP password | ftpPassword | | | --ftpBackupLocation | true | Backup location on the FTP server | /ftpBackupLocation | | | --emailService | false | E-Mail service to be used (ex. gmail) | gmail | E-Mail are only sent if all email arguments are set | | --emailUser | false | E-Mail username | [email protected] | E-Mail are only sent if all email arguments are set | | --emailPassword | false | E-Mail password | emailPassword | E-Mail are only sent if all email arguments are set | | --emailTo | false | E-Mail recipient | [email protected] | E-Mail are only sent if all email arguments are set | | --file | true | File to backup | /path/to/file.txt | | | --logFile | false | File to log to | /path/to/file.log | | | --configFile | false | Non-Default Config file | /path/to/file.json | If set, default config file will be ignored |
File
Config file template
{
"ftpHost": "ftpHost.com",
"ftpUser": "ftpUser",
"ftpPassword": "ftpPassword",
"ftpBackupLocation": "/ftpBackupLocation",
"emailService": "gmail",
"emailUser": "[email protected]",
"emailPassword": "emailPassword",
"emailTo": "[email protected]",
"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="[email protected]" --emailPassword="emailPassword" --emailTo="[email protected]" --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="[email protected]" --file="/path/to/file.txt"