turbo-sync/README.md

87 lines
1.8 KiB
Markdown
Raw Normal View History

2024-10-16 04:44:48 +00:00
# Turbo Sync
A no-nonsense file/folder synchronization application
## Requirements
Turbo sync requires **node js** and **rsync**
## Installation
2024-10-16 05:50:00 +00:00
To install simply run:
```bash
npm install --registry="https://git.tben.me/api/packages/Moduletrace/npm/" -g turbosync
```
To update run:
2024-10-16 04:44:48 +00:00
```bash
2024-10-16 05:50:00 +00:00
npm update --registry="https://git.tben.me/api/packages/Moduletrace/npm/" -g turbosync
2024-10-16 04:44:48 +00:00
```
## Usage
Turbo Sync requires a `JSON` file with the correct configuration. example:
```bash
turbosync ./project/sync/config.json
```
However if you have a file named `turbosync.config.json` in the working directory simply run:
2024-10-16 04:44:48 +00:00
```bash
turbosync
2024-10-16 04:44:48 +00:00
```
In this case Turbo Sync will automatically look for a file named `turbosync.config.json` in the working directory for config params.
2024-10-16 04:44:48 +00:00
### Config File
2024-10-16 05:50:00 +00:00
The config file is a json file that contains all the information needed to run turbosync. Example:
2024-10-16 04:44:48 +00:00
```json
[
{
"title": "Sync Files",
"files": [
"/home/user/file1.txt",
"/home/user/file2.txt",
{
"path": "/home/user/file3",
"user": "root",
"host": "5.34.75.236",
"ssh_key": "/home/user/.ssh/key"
}
]
},
{
"title": "Sync Folders",
"options": {
"delete": true
},
"folders": [
"/home/user/folder1",
"/home/user/folder2",
{
"path": "/home/user/folder3",
"user": "user",
"host": "5.39.67.76",
"ssh_key": "/home/user/.ssh/key"
}
]
}
]
```
You can also use environment variables in the config file. Example:
```json
[
{
"title": "Sync Folders",
"folders": ["$FOLDER_1", "$FOLDER_2"]
}
]
```