📝 docs: add comprehensive quickstart guide#73
📝 docs: add comprehensive quickstart guide#73farivar-tabatabaei wants to merge 2 commits intoborgbackup:masterfrom
Conversation
- 📌 Add a detailed prerequisites section covering BorgBackup installation, Python 3.9+ requirement, and disk space considerations - 📂 Document basic usage pattern and command structure for all importers - 💡 Provide practical examples for rsnapshot, rsynchl, rsync_tmbackup, and Borg-to-Borg imports with complete workflow steps - ⚙️ Include a common options section covering prefixes, Borg options, and debug mode - 🧠 Explain the smart temporary relocation mechanism that preserves Borg's file cache efficiency and deduplication - 🛡️ Document safety features including non-destructive operations, resume capability, duplicate detection, and journal tracking - 🧯 Add a troubleshooting section for common issues like missing Borg command, interrupted imports, permissions, and disk space - 📖 Provide clear guidance on getting help and next steps for users - ❌ The ".. highlight:: bash" directive has been removed as per it will automatically be included from "global.rst.inc" with ".. include:: global.rst.inc" directive. This quickstart guide serves as a comprehensive introduction that gets users up and running quickly while explaining the underlying mechanics and safety features that make borg-import reliable.
Switched from [tool.pytest] to [tool.pytest.ini_options] in pyproject.toml to align with pytest's expected configuration format and avoid schema errors.⚠️ Although it may seem inconsistent with other tools, the pytest team has reserved [tool.pytest] for future use with a richer TOML-native configuration 📦. The [tool.pytest.ini_options] section serves as a compatibility bridge with the existing .ini-style configuration system 🔄. 📚 As per: https://docs.pytest.org/en/stable/reference/customize.html#pyproject-toml
| 1. **BorgBackup installed**: borg-import requires the ``borg`` command to be available in your PATH. | ||
| Install it following the `BorgBackup installation guide <https://borgbackup.readthedocs.io/en/stable/installation.html>`_. | ||
|
|
||
| 2. **Python 3.9 or newer**: borg-import is written in Python and requires a modern Python version. |
There was a problem hiding this comment.
When we upgrade the python requirements, it would always need a change here also. Maybe this hint is not needed, I guess pip will also tell if the python requirement is not fulfilled.
There was a problem hiding this comment.
I agree that pip will catch unmet Python version requirements. However, I think it's still helpful to keep line 17 as a quick upfront reminder for users reading the quickstart guide, especially those who might not be familiar with Python tooling. It provides a clearer picture of the prerequisites before they even try installing, which can help reduce friction and confusion and save time early on.
Also, the Python version requirement doesn’t change regularly, so the maintenance burden for this line should be minimal.
There was a problem hiding this comment.
There isn't much "burden", but it can easily happen that this place is overlooked when raising the python requirements and then the docs will differ from the code reality until somebody notices.
|
|
||
| Where: | ||
|
|
||
| - ``<IMPORTER>`` is one of: ``borg``, ``rsnapshot``, ``rsynchl``, or ``rsync_tmbackup`` |
There was a problem hiding this comment.
When we add a new importer, this would need fixing.
Does borg-import -h give a list of importers?
| 3. **Restoration**: Original directories are moved back to their original locations | ||
| 4. **Timestamp preservation**: Original backup timestamps are preserved in Borg archives | ||
|
|
||
| This process ensures that Borg's deduplication and file cache work optimally across imports. |
There was a problem hiding this comment.
"files cache"
(the cache file historically was named just "files")
| Next Steps | ||
| ---------- | ||
|
|
||
| - Read the detailed documentation for your specific backup format |
There was a problem hiding this comment.
What do you mean? Read the borg docs?
The converter always converts to a borg repository.
|
|
||
| - Read the detailed documentation for your specific backup format | ||
| - Consider setting up automated backups with your new Borg repository | ||
| - Learn about Borg's powerful features like mounting, pruning, and compression options |
There was a problem hiding this comment.
Strictly taken, one would think about the desired compression before borg-import-ing into a borg repo and give the respective compression option to borg-import already. Preferably one does not want to use different compression algorithms for borg-import and later for borg.
| Before using borg-import, you need: | ||
|
|
||
| 1. **BorgBackup installed**: borg-import requires the ``borg`` command to be available in your PATH. | ||
| Install it following the `BorgBackup installation guide <https://borgbackup.readthedocs.io/en/stable/installation.html>`_. |
There was a problem hiding this comment.
Strictly taken, the user has to use the version selector there and select precisely the version they are using.
| # Create a new Borg repository first | ||
| borg init --encryption=repokey /path/to/new/borg/repo | ||
|
|
There was a problem hiding this comment.
Maybe move this to an own section.
| # Create a new Borg repository first | ||
| borg init --encryption=repokey /path/to/new/borg/repo | ||
|
|
|
|
||
| 1. **Temporary relocation**: Source directories are temporarily moved to a common name (``borg-import-dir``) | ||
| 2. **Archive creation**: Borg creates archives from this temporary location | ||
| 3. **Restoration**: Original directories are moved back to their original locations |
There was a problem hiding this comment.
Maybe avoid the word "restoration" here, considering it is usually used in a different meaning when talking about backing up and restoring files...
| **"borg-import-dir exists. Cannot continue"** | ||
| A previous import was interrupted. Check the directory and ``.snapshot`` file to understand what happened, then manually clean up if safe to do so. |
There was a problem hiding this comment.
Did you see that while using borg-import?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #73 +/- ##
=======================================
Coverage 54.81% 54.81%
=======================================
Files 9 9
Lines 332 332
Branches 46 46
=======================================
Hits 182 182
Misses 140 140
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
📝 docs: Add comprehensive 🚀 quickstart guide for borg-import
Check commit 35dcf43 for the changes.
📌 Add a detailed prerequisites section covering BorgBackup installation, Python 3.9+ requirement, and disk space considerations
📂 Document basic usage pattern and command structure for all importers
💡 Provide practical examples for rsnapshot, rsynchl, rsync_tmbackup, and Borg-to-Borg imports with complete workflow steps
⚙️ Include a common options section covering prefixes, Borg options, and debug mode
🧠 Explain the smart temporary relocation mechanism that preserves Borg's file cache efficiency and deduplication
🛡️ Document safety features including non-destructive operations, resume capability, duplicate detection, and journal tracking
🧯 Add a troubleshooting section for common issues like missing Borg command, interrupted imports, permissions, and disk space
📖 Provide clear guidance on getting help and next steps for users
❌ The ".. highlight:: bash" directive has been removed as it will automatically be included from "global.rst.inc" with ".. include:: global.rst.inc" directive.
This quickstart guide serves as a comprehensive introduction, getting users up and running quickly while explaining the underlying mechanics and safety features that make borg-import reliable.
🔧 fix(pytest): move pytest config to [tool.pytest.ini_options]
Check commit 9eff667 for the fix.
Switched from [tool.pytest] to [tool.pytest.ini_options] in pyproject.toml⚠️
to align with pytest's expected configuration format and avoid schema errors.
Although it may seem inconsistent with other tools, the pytest team has
reserved [tool.pytest] for future use with a richer TOML-native configuration 📦.
The [tool.pytest.ini_options] section serves as a compatibility bridge
with the existing .ini-style configuration system 🔄.
📚 As per: https://docs.pytest.org/en/stable/reference/customize.html#pyproject-toml