hestiacp / hestiacp

Hestia Control Panel | A lightweight and powerful control panel for the modern web.
https://hestiacp.com
GNU General Public License v3.0
3.31k stars 675 forks source link

[Feature] backup exclusion templates #3227

Closed jlguerrerosanz closed 1 year ago

jlguerrerosanz commented 1 year ago

Describe the feature or change in detail

To be able to have a backup preset and a menu to choose from or a starting point so backups can be easily optimized for common CMS such as WordPress.

The template system could be similar to the Nginx one or maybe like the hosting plans...

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

No

jaapmarcus commented 1 year ago

Why would you want to exclude by default any folders?

I don't see the reasons for it...

jlguerrerosanz commented 1 year ago

Cache folders for instance

jlguerrerosanz commented 1 year ago

Zipfiles bigger than x MB Some WP backup plugins leave zipfiles behind.

Maybe I only need the wp-content folder without plugins and themes since the rest of the assets can be downloaded.

jaapmarcus commented 1 year ago

So it is very specific. I don't see any reason for it. I would prefer to spend the time on issues with a way higher priority

jlguerrerosanz commented 1 year ago

If hestiaCP stores the config in a file, I can create my own script that copies that template upon user creation

ScIT-Raphael commented 1 year ago

there is already a config called backup exclusion in user data file which you can blow up with a script so much you like to do: https://github.com/hestiacp/hestiacp/blob/c65edbad7fb9b4da567534b88fa3213f51bf19a1/bin/v-backup-user#L40

Beside that, I go along with @jaapmarcus - there feature request is way to specific, there would not be a big user group which will use it - beside we have other pending points to do.

jlguerrerosanz commented 1 year ago

If I come up with a solution would you accept a PR?

Something like a v-command without interface v-add-web-domain-backup-exclude username domain template.conf

jaapmarcus commented 1 year ago

We have already support for it for:

See: https://github.com/hestiacp/hestiacp/blob/main/bin/v-update-user-backup-exclusions

Settings are set on user level and not on domain level.

But it should be enough....

jlguerrerosanz commented 1 year ago

Great, thank you very much.

So I have been having a look here and as long as I place a file here: /usr/local/hestia/data/users/USERNAME/backup-excludes.conf

There is this open PR with the issue. https://github.com/hestiacp/hestiacp/pull/3225 When its published then I will be able to add `:public_html/cache:public_html/backup:public_html/bkp:public_html/.tar.gz:public_html/*.zip`

Since there is no documentation available, i am not sure if this will work. Specially with the files.

The thing is that the users may install WP backup plugins on their own and leave the garbage behind and I will be feeding the backup system with more backups inside in a funny recursive-fractal structure.

jaapmarcus commented 1 year ago

Great, thank you very much.

So I have been having a look here and as long as I place a file here: /usr/local/hestia/data/users/USERNAME/backup-excludes.conf

There is this open PR with the issue. #3225 When its published then I will be able to add `:public_html/cache:public_html/backup:public_html/bkp:public_html/.tar.gz:public_html/*.zip`

Since there is no documentation available, i am not sure if this will work. Specially with the files.

The thing is that the users may install WP backup plugins on their own and leave the garbage behind and I will be feeding the backup system with more backups inside in a funny recursive-fractal structure.

I don't think this will work...