Go to file
2024-10-16 09:40:21 +01:00
lib Major update: Add Environment variables support 2024-10-16 09:40:21 +01:00
utils Major update: Add Environment variables support 2024-10-16 09:40:21 +01:00
.gitignore First Commit 2024-10-16 05:44:48 +01:00
.npmrc Add .npmrc file 2024-10-16 05:51:56 +01:00
index.js Major update: Add Environment variables support 2024-10-16 09:40:21 +01:00
package-lock.json First Commit 2024-10-16 05:44:48 +01:00
package.json Remove unnecessary console logs 2024-10-16 08:34:18 +01:00
README.md Major update: Add Environment variables support 2024-10-16 09:40:21 +01:00
tsconfig.json First Commit 2024-10-16 05:44:48 +01:00
types.js Major update: Add Environment variables support 2024-10-16 09:40:21 +01:00

Turbo Sync

A no-nonsense file/folder synchronization application

Requirements

Turbo sync requires node js and rsync

Installation

To install simply run:

npm install --registry="https://git.tben.me/api/packages/Moduletrace/npm/" -g turbosync

To update run:

npm update --registry="https://git.tben.me/api/packages/Moduletrace/npm/" -g turbosync

Usage

Turbo Sync requires a JSON file with the correct configuration. example:

turbosync ./project/sync/config.json

However if you have a file named turbosync.config.json in the working directory simply run:

turbosync

In this case Turbo Sync will automatically look for a file named turbosync.config.json in the working directory for config params.

Config File

The config file is a json file that contains all the information needed to run turbosync. Example:

[
    {
        "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:

[
    {
        "title": "Sync Folders",
        "folders": ["$FOLDER_1", "$FOLDER_2"]
    }
]