Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backups: Add support for creating fully uncompressed backups #3378

Merged
merged 1 commit into from Feb 3, 2022

Conversation

3v1n0
Copy link
Contributor

@3v1n0 3v1n0 commented Dec 22, 2021

Proposed change

Hassio supervisor saves backups in tar files that contains compressed
tar archives, this is convenient when such backups are kept in the same
environment or need to be transferred remotely, but it's not convenient
when they will be processed using other backup tools such as borg or
restic that can handle compression, encryption and data deduplication
themselves.

In fact deduplication won't actually work at all with hassio compressed
backups as there's no way to find common streams for such tools (unless
we make them to export the archives during importing as borg's
import-tar can do), but this would lead to archives that are not easily
recoverable by the supervisor.

So, make possible to pass a "compressed" boolean parameter when creating
backups that will just archive all the data uncompressed.

It will be then up to other tools to manage the archives compression.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

@pvizeli
Copy link
Member

pvizeli commented Dec 28, 2021

Need update the CLI + Our API documentation

@pvizeli pvizeli added the new-feature A new feature label Dec 28, 2021
3v1n0 added a commit to 3v1n0/ha-cli that referenced this pull request Jan 19, 2022
Backups can be optionally uncompressed so provide command line flags to
request that.

Related to: home-assistant/supervisor#3378
3v1n0 added a commit to 3v1n0/developers.home-assistant that referenced this pull request Jan 19, 2022
@3v1n0
Copy link
Contributor Author

3v1n0 commented Jan 19, 2022

Need update the CLI + Our API documentation

@pvizeli Took a bit, but added the CLI and API docs updates

@pvizeli
Copy link
Member

pvizeli commented Jan 21, 2022

CI still not pass

Copy link
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please fix the tests + lint

Hassio supervisor saves backups in tar files that contains compressed
tar archives, this is convenient when such backups are kept in the same
environment or need to be transferred remotely, but it's not convenient
when they will be processed using other backup tools such as borg or
restic that can handle compression, encryption and data deduplication
themselves.

In fact deduplication won't actually work at all with hassio compressed
backups as there's no way to find common streams for such tools (unless
we make them to export the archives during importing as borg's
import-tar can do), but this would lead to archives that are not easily
recoverable by the supervisor.

So, make possible to pass a "compressed" boolean parameter when creating
backups that will just archive all the data uncompressed.

It will be then up to other tools to manage the archives compression.
@pvizeli pvizeli merged commit 80e67b3 into home-assistant:main Feb 3, 2022
pvizeli pushed a commit to home-assistant/developers.home-assistant that referenced this pull request Feb 3, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants