Skip to content
/ PySync Public
forked from iotarepeat/PySync

Sync two or more directories on same network

License

Notifications You must be signed in to change notification settings

Apex-94/PySync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pysync

License: GPL v3 Python 3.6

Sync two or more directories on same network

Requirments

Install Python 3.x

Link

Install pyftplib Module if you intend to run a server on that machine.

pip install pyftplib

Initial setup

Note: setup.py would suffice for most home networks. For other networking setups, please modify the server.json and client.json

  1. Run setup.py to setup the Server mode or to Setup the Client mode
  2. If Server is selected by entering '1' in command Line, Enter the absolute path ie If the path is built starting from the system root, it is called absolute.
  3. Select Read only Mode to be enable or disable ie Enter in command line 'y' for Read Only mode and Enter 'n' for it to be disabled
    Read Only: In this case, read-only means that the file can be only opened or read (by client); you cannot delete, change, or rename any file that's been flagged read-only.
  4. Make sure the Client is running on other devices.
  5. A list of available IP's would be shown
  6. Follow the instructions in Command Line Prompt
  7. Sharing ip would create a mesh topology, else star topology.
  8. To ONLY run Client Followed by the prompt to Enter Folder path to where you want to sync
python setup.py
>python setup.py
1) Server
2) Client
>> 2
Client is running

Setup is done.

To run server

python main.py s
[I 2019-03-21 22:15:29] >>> starting FTP server on 0.0.0.0:9090, pid=22424 <<<
[I 2019-03-21 22:15:29] concurrency model: multi-thread
[I 2019-03-21 22:15:29] masquerade (NAT) address: None
[I 2019-03-21 22:15:29] passive ports: None

To run client

python main.py c

Note: You will need to run main.py (s|c) on regular intervals.

  1. Windows: Use task schedular
  2. Linux: Use crontab

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU GPLv3

About

Sync two or more directories on same network

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%