Coder Social home page Coder Social logo

py-sync's Introduction

py-sync

rsync via python for ease of configuration

Requirements

  • Python 3 - this script has not been fully tested on Python 2
  • Python pip

Installation

Using git:

cd
git clone https://github.com/rycolos/py-sync.git
cd py-sync

Using wget:

cd
wget https://github.com/rycolos/py-sync/archive/master.zip
unzip master.zip
cd py-sync-master

Install dependencies:

pip install -r requirements.txt

Configuration

Remove .template from the py-sync.conf.template config file and update per your local and backup path on the same machine or per your backup path on a remote system.

#THIS SCRIPT MUST BE RUN ON THE LOCAL MACHINE

[input_paths] #separate by comma, no space. trailing slash only copies content and not directory level
input_paths = /Users/PATH,/Users/PATH

[output_path] #directory must already exist
output_path = [email protected]:/PATH

[backup_path]
backup_path = [email protected]:/PATH/deleted

[exclude_paths] #requires disable_relative_path enabled. separate by comma, no space. use full path name.
exclude_paths = 

[arguments] #1 enabled, 0 disabled
delete_from_dest = 1
use_relative_path = 1
backup_deleted_dest = 1

#arguments explained (if enabled):
#delete_from_dest -- if files are deleted at source, also delete at destination
#use_relative_path -- full source path names are copied to destination
#backup_deleted_dest -- if a file is deleted at destination, copy to this folder on destination

Usage

Ensure your py-syn.conf file has been updated and run the script:

python3 py-sync.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.