/SP_sync_tool

Semestrálna práca na POS - synchronizačný nástroj

Primary LanguageC++

SP_sync_tool

A tool for synchronizing files from the client to the server.

It only works on Linux.

Launching

The app does not save the port number or IP address of server

First launch

Enter 
[ 's' / 'server' ] to run as server
[ 'c' / 'client' ] to run as client:

Server

[Q] Enter server port number: 

Here enter your desired port number and hit Enter

[Q] Enter path to directory: 

Here enter the path to a folder, which will be used by the server, and hit Enter, the server will then turn ON

Client

[Q] Enter server IP address: 

Here enter the IP address of your server and hit Enter

[Q] Enter server port number: 

Here enter the server port and hit Enter

[Q] Enter path to directory: 

Here enter the path to the folder which will be synchronized with the server and hit Enter, the client will then turn ON and connect to the server at the entered IP address and port

You can change the path later

Controls

Client controls

Available commands:

  • slist - get list of files on server
  • sync - synchronize files with server
  • autosync [on|off] - turn on / off automatic synchronization
  • autocheck [s] - in seconds, sets how often the sync folder should be scanned for file updates
  • setpath [path] - sets the path to the folder whose contents will be synchronized
  • delete [file] - deletes the specified file
  • sdelete [file] - deletes the specified file on server
  • restore [file] - restores the specified file
  • exit - closes the application

Server controls

  • exit - turn OFF the server, for this command to work, at least one client must connect and disconnect after entering this command

Restrictions

  • Editing files must be done when the client is on because it will not be synchronized
  • Creating new files is possible even if client is not turned on
  • Files must not have a space in the name
  • Deleting files is done exclusively via the client
  • Files will remain on the server until you issue a command to delete them on the server
  • Two clients need to be launched for synchronization between two local folders

© Matúš Suský, David Kučera 2024