Goback is a distributed local backup tool designed to facilitate secure and efficient file backups. The tool includes both a client and server component to manage and perform backups across different machines.
- Go 1.22 or higher
- SSH key for server operations (generate one for yourself)
It is necessary to install golanci-lint to run the project.
for linux users:
yay golangci-lint
Other users:
https://golangci-lint.run/welcome/install/
To run the server, you will need a SSH key. Generate it using:
ssh-keygen -t rsa -b 4096 -f id_rsa
Place the generated id_rsa file inside the
private
directory in the root folder of the project.
You can build the project using make
. Available commands in the Makefile
are:
clean
: Remove build artifactstest
: Lint the code and Run testsbuild
: Lint the code and Build the binaryformat
: Format and tidy the codelint
: Lint, format and tidy the codetidy
: Tidy up dependencies
To build the project, run:
make build
OR
make
After building the project, you can run the binary using:
Client: To open up the client prompt, run:
./goback client
Server: To open the server prompt, which shows listen logs and an exit command, run:
./goback server
If you want to run using goback
only you can export a path variable instead run inside the root folder1:
export PATH=$PATH:$(pwd)
The client command opens a prompt allowing you to interact with the backup tool. It includes options for uploading files, listing directories, and exiting.
The server command starts a server that listens for incoming client connections. You will see logs of the server's activity and have the option to exit the server prompt.
Contributions are welcome! Please ensure that your code adheres to the project's style guidelines and includes tests.