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

DietPi-Software | Restic: is a fast and secure backup program #6350

Merged
merged 11 commits into from
May 6, 2023

Conversation

goldfix
Copy link
Contributor

@goldfix goldfix commented Apr 29, 2023

Added new backup software:

  • Restic: is a fast and secure backup program

@MichaIng
Copy link
Owner

MichaIng commented Apr 29, 2023

Thanks for your contribution.

Generally we do not implement software options which are nothing more than an apt install package. We do have a bunch of software options from old times, but actually we are thinking about removing them. There is not much point in cloning the Debian package list and provide a simple wrapper for it. Users should know that DietPi is Debian, that hence the whole Debian package repository is available and how to install such a package. @Joulinar

dietpi/dietpi-software Outdated Show resolved Hide resolved
@goldfix
Copy link
Contributor Author

goldfix commented Apr 29, 2023

Up to you to decide. :)
The only advantage is the final force update (the restic version in debian repository is very old).

Thanks

@MichaIng
Copy link
Owner

MichaIng commented Apr 30, 2023

The only advantage is the final force update (the restic version in debian repository is very old).

Then it would be probably better to install it from a different source in the first place. When mixing APT packages with internal auto-updates it is possible that an APT upgrade downgrades your software. Also of course package integrity checks fails etc.

How are these internal updates done? A check + in case update on every restic call? An additional update service, timer or cron job?
EDIT: Ah, it's a one time action: https://github.com/restic/restic/blob/master/cmd/restic/cmd_self_update.go
This makes the above argument stronger, since users then would need to run this command manually every time the package is upgraded or reinstalled. And when using a different source (like downloading the official binaries: https://github.com/restic/restic/releases), the natural downside is that one might miss critical security patches when not regularly checking for updates.

@MichaIng
Copy link
Owner

MichaIng commented Apr 30, 2023

@StephanStS @Joulinar
Let's have this discussion here instead of in docs: Adding this would basically contradict previous decisions to not add software which can be installed just via APT. Consequently we would then open the can of worms of cloning the ~60.000 APT packages of the Debian repo as APT wrapper into dietpi-software, which does not make any sense.

But the other thing that is done here is updating the binary from official compiled binaries: self-update just downloads the bz2-compressed binary and replace /usr/bin/restic with it. As this breaks the integrity of the package, I would then suggest to download the official binary from GitHub directly instead of installing the package. The question is whether upstream binaries are so much better to justify the implementation as alternative to APT. Another example where we did this was Rclone.

@MichaIng MichaIng requested a review from StephanStS April 30, 2023 17:03
dietpi/dietpi-software Outdated Show resolved Hide resolved
dietpi/dietpi-software Outdated Show resolved Hide resolved
@MichaIng MichaIng added this to the v8.17 milestone May 6, 2023
dietpi/dietpi-software Outdated Show resolved Hide resolved
MichaIng added 5 commits May 6, 2023 15:09
- DietPi-Software | Restic: Follow closer the description on their GitHub + making clear that it is a CLI tool: https://github.com/restic/restic
- DietPi-Software | Restic: Download binary from upstream repo in the first place and skip APT install
- DietPi-Software | Restic: Update uninstall code for new install method
- DietPi-Software | Restic: Add meta info, changelog, re-arrange code to be located behind Rclone, add RISC-V support
@MichaIng
Copy link
Owner

MichaIng commented May 6, 2023

Install test on all platforms: https://github.com/MichaIng/DietPi/actions/runs/4901851720

I verified that the arm binary is ARMv6-compatible.

MichaIng and others added 2 commits May 6, 2023 15:44
- DietPi-Software | Restic: Fix install ID
@MichaIng
Copy link
Owner

MichaIng commented May 6, 2023

Looks good, merging it now.

@MichaIng MichaIng merged commit b17bf22 into MichaIng:dev May 6, 2023
@MichaIng MichaIng mentioned this pull request May 6, 2023
@goldfix goldfix deleted the dev-add-restic-software branch May 6, 2023 19:46
@lima1
Copy link

lima1 commented May 8, 2023

@MichaIng , I had a restic binary in /usr/local/bin (not sure it's relevant, but mention it in case it is). After installing it with dietpi-software, the binary was updated, but was missing the executable flag. After chmod +x, it worked.

disconn3ct added a commit to disconn3ct/DietPi that referenced this pull request May 10, 2023
* dev:
  v8.17
  v8.17
  v8.17 (MichaIng#6350)
  v8.17
  v8.17
  v8.17
  v8.17
  v8.17
  v8.17
  v8.17
  v8.17
  v8.17 (MichaIng#6364)
  v8.17
  v8.17
  v8.17
  v8.17
MichaIng added a commit that referenced this pull request May 10, 2023
- DietPi-Software | Restic: Resolved an issue where Restic was installed without executable flag. Many thanks to @ for reporting this issue: #6350
@MichaIng
Copy link
Owner

Ayy, many thanks for reporting. Fixed for next release: 6ba1d61
I'll probably push a life patch for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants