partial-backup 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. partial_backup-0.0.1/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
  2. partial_backup-0.0.1/.github/ISSUE_TEMPLATE/config.yml +6 -0
  3. partial_backup-0.0.1/.github/ISSUE_TEMPLATE/feature_request.md +24 -0
  4. partial_backup-0.0.1/.github/pull_request_template.md +12 -0
  5. partial_backup-0.0.1/.github/workflows/codeql.yml +81 -0
  6. partial_backup-0.0.1/.github/workflows/markdown-lint.yml +26 -0
  7. partial_backup-0.0.1/.github/workflows/python-app.yml +122 -0
  8. partial_backup-0.0.1/.github/workflows/python-publish.yml +29 -0
  9. partial_backup-0.0.1/.gitignore +166 -0
  10. partial_backup-0.0.1/.pre-commit-config.yaml +15 -0
  11. partial_backup-0.0.1/CONTRIBUTING.md +21 -0
  12. partial_backup-0.0.1/PKG-INFO +123 -0
  13. partial_backup-0.0.1/README.md +98 -0
  14. partial_backup-0.0.1/markdownlint-config.json +15 -0
  15. partial_backup-0.0.1/partial_backup/__init__.py +0 -0
  16. partial_backup-0.0.1/partial_backup/__main__.py +28 -0
  17. partial_backup-0.0.1/partial_backup/_version.py +34 -0
  18. partial_backup-0.0.1/partial_backup/backup.py +288 -0
  19. partial_backup-0.0.1/partial_backup/mbdb.py +172 -0
  20. partial_backup-0.0.1/partial_backup.egg-info/PKG-INFO +123 -0
  21. partial_backup-0.0.1/partial_backup.egg-info/SOURCES.txt +26 -0
  22. partial_backup-0.0.1/partial_backup.egg-info/dependency_links.txt +1 -0
  23. partial_backup-0.0.1/partial_backup.egg-info/entry_points.txt +2 -0
  24. partial_backup-0.0.1/partial_backup.egg-info/requires.txt +8 -0
  25. partial_backup-0.0.1/partial_backup.egg-info/top_level.txt +2 -0
  26. partial_backup-0.0.1/pyproject.toml +41 -0
  27. partial_backup-0.0.1/requirements.txt +4 -0
  28. partial_backup-0.0.1/setup.cfg +4 -0
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Test environment**
11
+ - Host OS version.
12
+ - Target device model and iOS version.
13
+
14
+ **Describe the bug**
15
+ A clear and concise description of what the bug is.
16
+
17
+ **To Reproduce**
18
+ Steps to reproduce the behavior:
19
+ 1. Go to '...'
20
+ 2. Click on '....'
21
+ 3. Scroll down to '....'
22
+ 4. See error
23
+
24
+ **Expected behavior**
25
+ A clear and concise description of what you expected to happen.
26
+
27
+ **Logs**
28
+ If applicable, add logs including backtraces for the given error that help explain your problem.
29
+
30
+ **Additional context**
31
+ Add any other context about the problem here.
32
+
33
+ ## For community
34
+ โฌ‡๏ธ **Please click the ๐Ÿ‘ reaction instead of leaving a `+1` or ๐Ÿ‘ comment**
@@ -0,0 +1,6 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Just ask the community a question
4
+ url: https://discord.gg/52mZGC3JXJ
5
+ about: Community help about pymobiledevice3.
6
+
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
21
+
22
+ ## For community
23
+
24
+ โฌ‡๏ธ **Please click the ๐Ÿ‘ reaction instead of leaving a `+1` or ๐Ÿ‘ comment**
@@ -0,0 +1,12 @@
1
+ <!---
2
+
3
+ Thanks for opening a PR on partial-backup!
4
+
5
+ Please review the CONTRIBUTING.md first regarding the linters we use and how
6
+ do we enforce them.
7
+
8
+ -->
9
+
10
+ ## For community
11
+
12
+ โฌ‡๏ธ **Please click the ๐Ÿ‘ reaction instead of leaving a `+1` or ๐Ÿ‘ comment**
@@ -0,0 +1,81 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ pull_request:
16
+ # The branches below must be a subset of the branches above
17
+ branches: [ "master" ]
18
+ paths:
19
+ - '.github/workflows/codeql.yml'
20
+ - 'pymobiledevice3/**'
21
+ - 'requirements.txt'
22
+ - 'pyproject.toml'
23
+ schedule:
24
+ - cron: '24 3 * * 6'
25
+
26
+ concurrency:
27
+ group: ${{ github.workflow }}-${{ github.ref }}
28
+ cancel-in-progress: true
29
+
30
+ jobs:
31
+ analyze:
32
+ name: Analyze
33
+ runs-on: ubuntu-latest
34
+ permissions:
35
+ actions: read
36
+ contents: read
37
+ security-events: write
38
+
39
+ strategy:
40
+ fail-fast: false
41
+ matrix:
42
+ language: [ 'python' ]
43
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
44
+ # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
45
+
46
+ steps:
47
+ - name: Checkout repository
48
+ uses: actions/checkout@v3
49
+
50
+ # Initializes the CodeQL tools for scanning.
51
+ - name: Initialize CodeQL
52
+ uses: github/codeql-action/init@v2
53
+ with:
54
+ languages: ${{ matrix.language }}
55
+ # If you wish to specify custom queries, you can do so here or in a config file.
56
+ # By default, queries listed here will override any specified in a config file.
57
+ # Prefix the list here with "+" to use these queries and those in the config file.
58
+
59
+ # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
60
+ # queries: security-extended,security-and-quality
61
+
62
+
63
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
64
+ # If this step fails, then you should remove it and run the build manually (see below)
65
+ - name: Autobuild
66
+ uses: github/codeql-action/autobuild@v2
67
+
68
+ # โ„น๏ธ Command-line programs to run using the OS shell.
69
+ # ๐Ÿ“š See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
70
+
71
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
72
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
73
+
74
+ # - run: |
75
+ # echo "Run, Build Application using script"
76
+ # ./location_of_script_within_repo/buildscript.sh
77
+
78
+ - name: Perform CodeQL Analysis
79
+ uses: github/codeql-action/analyze@v2
80
+ with:
81
+ category: "/language:${{matrix.language}}"
@@ -0,0 +1,26 @@
1
+ name: Markdown linting
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ "master" ]
6
+ paths:
7
+ - '**/*.md'
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ build:
15
+ if: '! github.event.pull_request.draft'
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: actions/setup-node@v1
21
+ with:
22
+ node-version: '20'
23
+ - name: Install Markdownlint CLI
24
+ run: npm install -g markdownlint-cli
25
+ - name: Run Markdownlint
26
+ run: markdownlint -c markdownlint-config.json "**/*.md"
@@ -0,0 +1,122 @@
1
+ name: Python application
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [ "master" ]
6
+ paths:
7
+ - '.github/workflows/python-app.yml'
8
+ - 'pymobiledevice3/**'
9
+ - 'requirements.txt'
10
+ - 'pyproject.toml'
11
+ release:
12
+ types: [ created ]
13
+
14
+ concurrency:
15
+ group: ${{ github.workflow }}-${{ github.ref }}
16
+ cancel-in-progress: true
17
+
18
+ jobs:
19
+ test:
20
+ if: '! github.event.pull_request.draft'
21
+ runs-on: ${{ matrix.os }}
22
+
23
+ strategy:
24
+ matrix:
25
+ python-version: [ 3.9, "3.10", "3.11", "3.12", "3.13" ]
26
+ os: [ ubuntu-latest, macos-latest, windows-latest ]
27
+
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ - name: Set up Python ${{ matrix.python-version }}
31
+ uses: actions/setup-python@v4
32
+ with:
33
+ python-version: ${{ matrix.python-version }}
34
+ - name: Install dependencies
35
+ run: |
36
+ python3 -m pip install --upgrade pip
37
+ python3 -m pip install pre-commit
38
+ - name: Run pre-commit hooks
39
+ run: |
40
+ pre-commit run --all-files
41
+ - name: Test install
42
+ run: |
43
+ python -m pip install -U '.[test]'
44
+ - name: Test show usage
45
+ run: pytest -m cli
46
+
47
+ # pyinstaller:
48
+ # needs: [ 'test' ]
49
+ # if: '! github.event.pull_request.draft'
50
+ # runs-on: ${{ matrix.os }}
51
+ #
52
+ # strategy:
53
+ # matrix:
54
+ # python-version: [ "3.12" ]
55
+ # os: [ ubuntu-latest, macos-latest, windows-latest ]
56
+ #
57
+ # steps:
58
+ # - uses: actions/checkout@v4
59
+ # - name: Set up Python
60
+ # uses: actions/setup-python@v4
61
+ # with:
62
+ # python-version: '3.x'
63
+ # - name: Install dependencies
64
+ # run: |
65
+ # python -m pip install --upgrade pip
66
+ # pip install -U . coloredlogs pyinstaller apple_compress
67
+ # - name: Build
68
+ # run: |
69
+ # python .github/workflows/generate-executable.py
70
+ #
71
+ # - if: matrix.os == 'ubuntu-latest'
72
+ # name: Test ubuntu artifact
73
+ # run: |
74
+ # ./dist/pymobiledevice3
75
+ #
76
+ # - if: matrix.os == 'macos-latest'
77
+ # name: Test macos artifact
78
+ # run: |
79
+ # ./dist/pymobiledevice3
80
+ #
81
+ # - if: matrix.os == 'windows-latest'
82
+ # name: Test windows artifact
83
+ # run: |
84
+ # ./dist/pymobiledevice3.exe
85
+ #
86
+ # - if: matrix.os == 'ubuntu-latest'
87
+ # name: Rename ubuntu artifact
88
+ # run: |
89
+ # mv ./dist/pymobiledevice3 ./dist/pymobiledevice3_ubuntu
90
+ # - if: matrix.os == 'macos-latest'
91
+ # name: Rename macos artifact
92
+ # run: |
93
+ # mv ./dist/pymobiledevice3 ./dist/pymobiledevice3_macos
94
+ #
95
+ # - if: matrix.os == 'ubuntu-latest'
96
+ # name: Upload ubuntu artifact
97
+ # uses: actions/upload-artifact@v3
98
+ # with:
99
+ # name: pymobiledevice3_ubuntu
100
+ # path: ./dist/pymobiledevice3_ubuntu
101
+ # - if: matrix.os == 'macos-latest'
102
+ # name: Upload macos artifact
103
+ # uses: actions/upload-artifact@v3
104
+ # with:
105
+ # name: pymobiledevice3_macosx
106
+ # path: ./dist/pymobiledevice3_macos
107
+ # - if: matrix.os == 'windows-latest'
108
+ # name: Upload windows artifact
109
+ # uses: actions/upload-artifact@v3
110
+ # with:
111
+ # name: pymobiledevice3_windows.exe
112
+ # path: ./dist/pymobiledevice3.exe
113
+ #
114
+ # - name: Upload server artifacts to GitHub Release
115
+ # if: github.event_name == 'release'
116
+ # uses: softprops/action-gh-release@v1
117
+ # with:
118
+ # files: |
119
+ # dist/pymobiledevice3_macos
120
+ # dist/pymobiledevice3_ubuntu
121
+ # dist/pymobiledevice3.exe
122
+ # token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,29 @@
1
+ # This workflows will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
+
4
+ name: Upload Python Package
5
+
6
+ on:
7
+ release:
8
+ types: [ created ]
9
+
10
+ jobs:
11
+ deploy:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v4
17
+ with:
18
+ python-version: '3.x'
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip
22
+ pip install -U build setuptools wheel twine
23
+ - name: Build and publish
24
+ env:
25
+ TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
26
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
27
+ run: |
28
+ python -m build
29
+ twine upload dist/*
@@ -0,0 +1,166 @@
1
+ .DS_Store
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ # For a library or package, you might want to ignore these files since the code is
89
+ # intended to run in multiple environments; otherwise, check them in:
90
+ # .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # poetry
100
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
102
+ # commonly ignored for libraries.
103
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104
+ #poetry.lock
105
+
106
+ # pdm
107
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108
+ #pdm.lock
109
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110
+ # in version control.
111
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
112
+ .pdm.toml
113
+ .pdm-python
114
+ .pdm-build/
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # Pyre type checker
151
+ .pyre/
152
+
153
+ # pytype static type analyzer
154
+ .pytype/
155
+
156
+ # Cython debug symbols
157
+ cython_debug/
158
+
159
+ # PyCharm
160
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
161
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
162
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
163
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
164
+ .idea/
165
+
166
+ partial_backup/_version.py
@@ -0,0 +1,15 @@
1
+ # .pre-commit-config.yaml
2
+ repos:
3
+ - repo: https://github.com/pre-commit/mirrors-isort
4
+ rev: v5.9.3
5
+ hooks:
6
+ - id: isort
7
+ args: [ '-m', 'HANGING_INDENT', '-l', '120','--check-only' ]
8
+ files: .
9
+
10
+ - repo: https://github.com/pycqa/flake8
11
+ rev: "7.0.0"
12
+ hooks:
13
+ - id: flake8
14
+ args: [ '--max-line-length=127' ]
15
+ files: \.py$
@@ -0,0 +1,21 @@
1
+ # Contibuting
2
+
3
+ If you would like to contribute, feel free to report issues, start new discussions, or create pull requests.
4
+
5
+ In general we recommend using our pre-commit hook which enforce the linter rules we use:
6
+
7
+ ```shell
8
+ python3 -m pip install -U pre-commit
9
+ pre-commit install
10
+ ```
11
+
12
+ In addition, please note we prefer using `'` for strings instead of `"`.
13
+
14
+ If you're having any troubles, You can also contact us on Discord:
15
+
16
+ <https://discord.gg/52mZGC3JXJ>
17
+
18
+ If you are lacking knowledge in how the different communication protocols work together, or how the project is
19
+ structured in design-form, you are advised to read:
20
+
21
+ [Understanding iDevice protocol layers](misc/understanding_idevice_protocol_layers.md)
@@ -0,0 +1,123 @@
1
+ Metadata-Version: 2.4
2
+ Name: partial-backup
3
+ Version: 0.0.1
4
+ Summary: Metadata-Aware Partial Backup Creator
5
+ Project-URL: Homepage, https://github.com/doronz88/partial-backup
6
+ Project-URL: Bug Reports, https://github.com/doronz88/partial-backup/issues
7
+ Keywords: ios,backup,partial-backup
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: pymobiledevice3>4.14.14
19
+ Requires-Dist: bpylist2
20
+ Requires-Dist: rich
21
+ Requires-Dist: click
22
+ Provides-Extra: test
23
+ Requires-Dist: pytest; extra == "test"
24
+ Requires-Dist: pytest-asyncio; extra == "test"
25
+
26
+ # ๐Ÿ—‚๏ธ partial-backup: Metadata-Aware Partial Backup Creator
27
+
28
+ This utility scans a given directory in a structured *"unbacked"* format and generates a `Backup` object that can be
29
+ written back as a valid backup. It preserves directory and file metadata such as ownership (`user_`), group (`group_`),
30
+ and file mode (`mode_`), and skips common junk files.
31
+
32
+ ---
33
+
34
+ ## ๐Ÿ“ฆ Features
35
+
36
+ - Recursively scans a directory organized by *domain* (e.g., `HomeDomain`)
37
+ - Supports embedded metadata in directory names (`user_501_group_0_mode_755`)
38
+ - Preserves and serializes:
39
+ - File contents
40
+ - Directory structure
41
+ - Ownership and permissions
42
+ - Skips system-specific noise like `.DS_Store` and `Thumbs.db`
43
+ - Outputs a fully reconstructable `Backup` object
44
+ - Simple CLI using [Typer](https://typer.tiangolo.com/)
45
+
46
+ ---
47
+
48
+ ## ๐Ÿ› ๏ธ Installation
49
+
50
+ ```bash
51
+ pip install partial-backup
52
+ ```
53
+
54
+ ## ๐Ÿงช Example Usage
55
+
56
+ Assume your source directory is structured like this:
57
+
58
+ ```none
59
+ unback/HomeDomain/
60
+ โ”œโ”€โ”€ user_501_group_0_mode_777/Library
61
+ โ”‚ โ””โ”€โ”€ Preferences/
62
+ โ”‚ โ””โ”€โ”€ com.example.settings.plist
63
+ ```
64
+
65
+ To generate the backup:
66
+
67
+ ```shell
68
+ partial-backup unback/ output/
69
+ ```
70
+
71
+ It will:
72
+
73
+ - Detect `HomeDomain`
74
+ - Extract user/group/mode from directories like `user_501_group_0_mode_777`
75
+ - Generate a Backup object
76
+ - Save the reconstructed backup to `output/`
77
+
78
+ ## โ™ป๏ธ Restore the Backup
79
+
80
+ The generated backup is compatible with [pymobiledevice3](https://github.com/doronz88/pymobiledevice3), and can be
81
+ restored to an iOS device using:
82
+
83
+ ```shell
84
+ pymobiledevice3 backup2 restore /path/to/backup --source . --no-copy --system
85
+ ```
86
+
87
+ ## ๐Ÿ“ Metadata Syntax
88
+
89
+ This tool supports optional metadata hints in folder names:
90
+
91
+ | Syntax | Meaning --- |
92
+ |------------------------------|----------------------------|
93
+ | `user_501` | File owned by user `501` |
94
+ | `group_20` | File belongs to group `20` |
95
+ | `mode_755` | File or directory mode |
96
+ | `user_501_group_20_mode_644` | All of the above |
97
+
98
+ These metadata markers are automatically removed from paths and applied to the appropriate file or directory entry.
99
+
100
+ ## โ›” Ignored Files
101
+
102
+ The following files and folders are skipped automatically:
103
+
104
+ - `.DS_Store`
105
+ - `Thumbs.db`
106
+ - `desktop.ini`
107
+ - `.Spotlight-V100`
108
+ - `.Trashes`
109
+
110
+ ## API Overview
111
+
112
+ ```python
113
+ from pathlib import Path
114
+ from partial_backup.backup import Backup
115
+
116
+ backup = Backup.create_backup_from_directory(Path('/path/to/unback'))
117
+ backup.write_to_directory(Path('/path/to/output'))
118
+ ```
119
+
120
+ ## ๐Ÿ™ Acknowledgments
121
+
122
+ Huge thanks to [@JJTech0130](https://github.com/JJTech0130) for his insights and foundational work on the backup DB
123
+ implementation.