Skip to content

192IP/mds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Backup Utility

Simple Backup Utility is a lightweight C++ console application designed to perform file and directory backups based on a list specified in list.txt.
The program automatically handles creating a backup directory and safely copying all listed files and folders.


Features

  • Load list of files and directories to back up from list.txt
  • Automatic verification and creation (or reset) of the backup destination
  • Recursive directory copying with full structure preservation
  • Simple and minimal user interaction
  • Clear runtime messages and basic error handling

Usage

  1. Prepare the list.txt file
    Each line must contain an absolute or relative path to a file or folder you want to back up. Example:

    /home/user/Documents/report.docx
    /home/user/Pictures/vacation
    /home/user/.bashrc
    
  2. Build the project
    Compile the program using a C++17 (or newer) compliant compiler:

    g++ backup.cpp -o backup -std=c++17
  3. Run the utility

    ./backup

    During execution:

    • The program loads the paths from list.txt.
    • Asks for the destination path for the backup.
    • Prompts you if the destination already exists (overwrite or exit).
    • Begins the backup process, reporting progress for each file or directory.

Requirements

  • C++17-compatible compiler (required for <filesystem>)
  • Linux, Windows, or any system supporting C++17 standard libraries

Error Handling

  • If list.txt cannot be opened, the program exits with an error.
  • If a file or directory from list.txt is missing, a warning is printed and the backup continues.
  • Unexpected behavior (such as inaccessible files) is handled gracefully with runtime messages.

Roadmap / TODO

This utility is currently under active development. Future improvements and fixes are planned:

  • Fix copying root-owned files: Detect and warn when trying to copy files that require elevated permissions.
  • Fix crash on missing files: Properly skip and report missing files without throwing exceptions.
  • Improve output formatting: Add clearer, cleaner status messages during backup.
  • Add logging: Write the entire backup process (successes, failures) into a log.txt file.
  • Command-line arguments: Allow specifying the list file and backup destination via command-line parameters.
  • Parallel copying: Optimize performance by adding multithreaded copying for large sets of files.
  • Error codes: Exit with appropriate status codes for easy scripting and automation.
  • Backup verification: Add optional checksum validation after copying.
  • Configuration file support: Allow configuring default settings via a .conf file.
  • Progress bar: Show a dynamic progress bar while copying.
  • Refactor codebase: Modularize and document code thoroughly for maintainability.
  • Cross-platform testing: Ensure full functionality on Linux, Windows, and macOS.

Important Notes

  • Always run the program with appropriate permissions for the files you want to back up.
  • The backup destination path must be accessible and writable by the user.
  • Make sure paths in list.txt are correct to avoid unnecessary errors.

License

This project is licensed under the terms of the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages