klone
klone is a simple backup tool that saves the most recent copy of your files. If don't want to use a complex backup system and you only want a simple system for you to save the most recent copy of your files, just do:
()
The objectives of this application: As a user: make simple backups with the most recent copy of the files and access them in a simple way through the OS fs, without the need to use an external app:
- Iterate through the directories. (DONE)
- Get the times of modification of each file in the directory of origin directory. (DONE)
- Get the times of modification of each file in the directory of target directory. (DONE)
- Compare both. If the origin directory time is greater than the target directory time that means that there were some changes, so it's neccessary to make a backup. (DONE)
- If a directory or a file doesn't exist in the target directory it will be created. (DONE)
The directory structure is intended to be something like this (is up to you to maintain a correct file structure):
|
\_ backup_dir
|
|_ backup1
| |_origin_dir(week1)
|
|_ backup2
|_origin_dir(week2)
Summary
A backup app that will store the most recent version of you files.
You indicate a directory and inside that directory a copy will be created. If you don't say the opposite it will be in the same directory.
You can tell the application to create a new directory so you can store the history of your file.
Maybes
- An option to store the configuration in a configuration file, so you don't have to indicate the paths or the exclusions all the time. (Maybe with a tui). It will also be useful to show progress. As the project progress I see this option more viable to not bloat the program with lots of arguments
- Multithreading support
Urgents
TODOS
- Exclusions and configurations stored in files (also initial copy) -> DONE, only exclusions
- Manage the cli output in a separate function, to allow concurrency
- Add behaviour for Windows when file or dir doesn't exist -> cacache
- Change transfer of ownership to reference passing to avoid clones and improve performance time and memory wise
- Some tests, especially a integration one
- Look for unwraps and change them for proper error handling. If can't be done, use expect. -> Done