FileBackupToolCLI is a command-line tool developed in Go. This tool allows you to back up a source file to a target path at specified intervals. The application provides a user-friendly interface using the cobra package.
- Copy a source file to a target path at specified intervals.
- Define source and target paths, as well as the copy frequency.
- Schedule the copy operation in seconds.
-
Clone the repository:
git clone https://github.com/barisaydogdu/FileBackupToolCLI.git
-
Navigate to the project directory:
cd FileBackupToolCLI -
Install the required dependencies:
go mod tidy
-
Build the project:
go build -o filecopy
-
Run the tool:
./filecopy
Use the backupfile command to specify the source file, target file, and copy frequency:
./filecopy backupfile --sourcefile /path/to/source/file --targetfile /path/to/target/file --period 60--sourcefile: Path to the source file you want to copy.--targetfile: Path to the target location.--period: Copy frequency in seconds.
To copy /home/user/source.txt to /home/user/backup.txt every 120 seconds:
./filecopy backupfile --sourcefile /home/user/source.txt --targetfile /home/user/backup.txt --period 120- Go: The programming language used for the project.
- Cobra: Library used for building the command-line interface.
If you would like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Make your changes and commit them:
git commit -m 'Added new feature' - Push your branch to the remote repository:
git push origin feature-name
- Create a Pull Request.