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

[Feature] Integrate Borg Backup #2809

Open
xeruf opened this issue Aug 1, 2022 · 17 comments
Open

[Feature] Integrate Borg Backup #2809

xeruf opened this issue Aug 1, 2022 · 17 comments
Labels
backup Issues related to backup components feature New feature or request

Comments

@xeruf
Copy link
Contributor

xeruf commented Aug 1, 2022

Describe the feature or change in detail

There is a set of scripts at https://github.com/ramirojoaquin/vestacp-borg-incremental-backups - could its functionality be made available in the UI? The current backup solutions are very inefficient at scale.

Would you like to sponsor this feature to have it implemented?

Yes

@xeruf xeruf added the feature New feature or request label Aug 1, 2022
@jaapmarcus
Copy link
Member

Basics works fine how ever it lacks support for restoring after deleting a user and restoring it. Currently you need to create a user first (Same name) and create domain config before restoring and that needs to be solved first

@jlguerrerosanz
Copy link
Contributor

jlguerrerosanz commented Aug 2, 2022

This would be a wonderful addition.
Not only because of the disk space but also because of the savings in CPU.

Currently I am using a wordpress backup plugin that implements incremental backups and sends them to wasabi S3 but it is a pain in the ass to restore a website. It takes forever.

Basics works fine how ever it lacks support for restoring after deleting a user and restoring it. Currently you need to create a user first (Same name) and create domain config before restoring and that needs to be solved first

Maybe the config could be backuped in a file. As far as I can see you would only need to ask for a password for that username or paste the hashed one from the backup.

As for the script:

  • if user !exists then create user and retrieve pass or ask for a new one
  • if domain !exists then create domain with the stored config from backup
  • restore backup.

@jaapmarcus
Copy link
Member

Have explained what needs to be changed:

https://forum.hestiacp.com/t/borg-incremental-backups/4826/11?u=eris

Other options might be:

@jlguerrerosanz
Copy link
Contributor

I have been reading both options and restic is the most mature and could easily substitute all the backup system.

It already integrates with sftp, s3 and many others.

It performs incremental backups too.

@dfag86
Copy link

dfag86 commented Aug 19, 2022

Also, I think that the restic is great and we don't need anything else. I have been working with it for 1.5 years without any failure. Over 1 TB of data went through Restic with success :)

@ww7
Copy link

ww7 commented Aug 24, 2022

I recommend having a look at Kopia

@jlguerrerosanz
Copy link
Contributor

Copia could work. It also has encryption.

NOTE: Kopia allows one password per repository, and there is currently no access control mechanism when sharing a repository with someone. If you share a repository with someone else, then you must also share your password with them and they will have access to your data. Therefore, make sure you trust all the other users/computers that you share a repository with!

@jakobbouchard jakobbouchard added the backup Issues related to backup components label Mar 7, 2023
@jaapmarcus
Copy link
Member

Copia could work. It also has encryption.

NOTE: Kopia allows one password per repository, and there is currently no access control mechanism when sharing a repository with someone. If you share a repository with someone else, then you must also share your password with them and they will have access to your data. Therefore, make sure you trust all the other users/computers that you share a repository with!

Rustic has the same thing...

Restic support for far...:

  • Backup
  • Setting up a new repo
  • Restore database
  • Restore DNS domain

@dfag86
Copy link

dfag86 commented Apr 12, 2023

Restic is the best ❤️😊😀👍

@jaapmarcus
Copy link
Member

Progress so far:
List snap shots
Screenshot 2023-04-16 at 02 53 06
"Selection what you want to restore"
Screenshot 2023-04-16 at 02 53 21
Restore specific files UI
Screenshot 2023-04-16 at 02 53 47

What to do:

  • Update packages to allow user to enable backups
  • Server settings
  • Restore of files working via UI
  • Bulk restore files + Options in: "Selection what you want to restore"
  • Testing
  • More Testing
  • Fine tuning / tweaking

Please note Browsing files and opening snapshots might be a bit slow....

@jlguerrerosanz
Copy link
Contributor

That's great news!! I love it! Thank you!

@jlguerrerosanz
Copy link
Contributor

Since you are going with restic, will you implement incremental backups to s3?

I will help with thorough testing. I have some spare students in my team that could test from now until June.

@jaapmarcus
Copy link
Member

For testing I currently use SFTP as an endpoint (Didn't spend any second yet on it) but there is no reason why it should not support anything
sftp:eris@xxxxxxx:/folder/${username}

As long we can do the same for s3 / b2 / what ever there should be no issue doing.

But as it also supports Rclone and we already support it for normal backups it is
easier to just "support"

  • Local
  • Rclone
  • SFTP

@jaapmarcus
Copy link
Member

jaapmarcus commented Apr 20, 2023

  1. Switch to the New branch

Run:
v-update-sys-hestia-git jaapmarcus feature/restic-support

  1. Install Restic + Rclone
# Restic
apt install restic 
rustic self-update

# Rclone
curl https://rclone.org/install.sh  | bash
  1. Config everything:
    Setup Rclone / SFTP end point what ever:

v-add-backup-host-restic "rclone:r2:/" "30" "8" 5 "3" "-1"

Will keep up to 30 snap shots
8 daily
5 weekly
3 montly

Create a cronjob:
/usr/bin/sudo /usr/local/hestia/bin/v-backup-users and run it once per day

  1. Update user packages and enable Incremental backups

And test :)

Few notes:

  • Backup user
  • Delete user
  • Restore user with key
  • Delete web domain
  • and restore the web domain still might have some permissions issues.

@dfag86
Copy link

dfag86 commented Apr 20, 2023

apt install restic , not rustic 😀

@tegola
Copy link

tegola commented Apr 24, 2023

This is wonderful news, looking forward to try it!

@fra81
Copy link
Contributor

fra81 commented Dec 14, 2023

Hi, sorry I don't understand good at which point is the feature incremental backup with restic, can anyone give a summary please? Very appreciated and thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backup Issues related to backup components feature New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants