BackupCat4j is a lightweight Java-based tool designed to back up files from a source folder to a destination directory with intelligence and reliability. It includes robust logging, resume capabilities, media compression (especially for videos), and smart organization based on file types.
-
✅ File-by-File Copying: Transfers files individually for better error isolation.
-
📦 Video Compression: Compresses video files on-the-fly using a target average bitrate (via FFMPEG).
-
📁 Auto File Organization: Based on the file types, each file will be organized into respective folders.
- Videos
- Images
- Documents
- Audio
- Others
-
⚙️ Highly Configurable: Easy customization of backup options through the builder pattern.
-
🔁 Resume Support: Resumes from the last successful file in case of interruptions.
-
📝 Understandable Logs: Tracks progress and reports errors clearly.
-
🚧 More Features Coming Soon:
- Incremental backups
- File verification using checksums
- More CLI options
- Download the latest
backupcat4j-x.x.x.zip
from here - Extract the contents to any folder on your system.
- Run
BackupCat4j.exe
. The app will open in a window and guide you through the required inputs, using sensible defaults. - Result will be printed in the window.
Output folder structure
B:\backup\20250120\
├── Videos\
├── Images\
├── Documents\
├── Audio\
└── Others\
If you prefer to run the JAR directly with custom options, following below steps:
Make sure the following tools are installed:
2. Download the latest JAR file from here
Replace the paths and options as needed.
java -jar backupcat4j-fx.jar \
source="I:\media" \
target="B:\backup" \
ffmpeg="D:\ffmpeg-7.1.1-essentials_build\ffmpeg.exe" \
ffprobe="D:\ffmpeg-7.1.1-essentials_build\ffprobe.exe" \
organize=FULL \
--compress \
--resume \
--replace \
--bitrate=3000000
git clone https://github.com/yourusername/BackupCat4j.git
cd BackupCat4j
Import as a Maven Java project.
Modify the main
method in App.java
to configure your test backup:
BackupOptions backupOptions = BackupOptions.builder()
.source("I:\\media\\dump") // Source folder
.target("B:\\backup\\20250120") // Destination folder
.replace(true) // Overwrite if file exists
.organize(OrganizeMode.FULL) // Organize files into type-based folders
.compressVideos(true) // Enable video compression
.maxAvgBitRate(3_000_000) // Set target bitrate for videos
.ffmpeg("D:\\apps\\ffmpeg\\bin\\ffmpeg.exe") // Path to ffmpeg
.ffprobe("D:\\apps\\ffmpeg\\bin\\ffprobe.exe") // Path to ffprobe
.skipOthers(false) // Include uncategorized files
.resume(true) // Enable resume feature
.build();
Simply run the main
method from your IDE.
Feel free to fix bugs or make improvements as needed. It would also be greatly appreciated if you could include relevant JUnit tests to ensure your changes are reliable and well-tested.
Pull requests and feature suggestions are welcome. Let’s make BackupCat4j the go-to utility for organized, smart backups.
- Java 24 – Core language
- FFMPEG / FFPROBE – For video inspection and compression
- Ensure the FFMPEG binary paths are correct and accessible.
- Recommended to test on a small batch before running on large sets.
- Some files may be skipped if unreadable, corrupt, or unsupported—check logs.
- Incremental backup (only changed files)
- File type filter
- Linux executable file
- Dry-run mode
- CLI interface improvements
- Config file support (e.g.,
backup.json
) - Hash-based integrity verification