How to create real backups of each account automatically

hello, this panel is excellent, they have corrected some inconveniences that I noticed in the past, congratulations.

I would like to ask how I can implement automatic backups of each account, I know that currently each account has an automatic backup, but they only have configuration information. How can I create the backup of the entire account? (domain website files, .sql databases, etc.),

If there is any script that they already have and I can add it to a chrome it also helps me to solve this problem.

Please give me options (scripts, methods, etc.)

Default backup should contain everything

hello, the backup copies do not have that information, they only have configuration files, I attach a screenshot, in other forums I have consulted and they tell me that they only have that
or if I need to configure something in the panel please tell me




Unless you altered your backup preferences, the backup will contain the user config files, all websites, all databases, and files in your user directory. However, the best way to restore them is not to open the file and sort through manually, but to use the v-restore-user script or the web interface. These restore utilities understand the file format and how things are stored in there.

If you want to check what was backed up, there will be a log file in the /backup/ directory which you can look at, named as user.log

If you’re not seeing everything you expect to see in there, then check Hestia CP backup section, for that user, and look to see if any domains, databases etc have been excluded in the “Backup Exclusions” section.

We compress our backups with zstd by de default as is is a lot faster then .gz

See:
https://docs.hestiacp.com/admin_docs/backups.html#how-to-extract-zstd-file

1 Like

hello, sorry but that format does not work as a backup.

I understand that it is recorded so that only hestia can read it but it doesn’t work for me, my servers usually suffer attacks where everything is lost, and that backup is not useful to restore the web to another hosting or server.

They will take into account that I would like to see the backups as cpanel does, they give you the copy, with the files exactly as you see them in the file manager, they give you the copies of the database in .sql format and they are fast access and reading.

but the format that hestia shows me is not presentable, also because I connect the backups to azure units, etc.

I attach a video where you can see the content of the backups that hestia generates, please review it if the backups should not be seen that way please tell me how to correct it, install hestiacp and do not modify any of those backup items.

Now, if the format can’t be changed, can you help me with a bash script that does the backups?

For example, if I were to backup a website right now, I would enter and run this command (pathaccount/ tar -czvf website.tar.gz * ) and then the databases (mysqldump -uUSERNAME -p DATABASE > backup .sql) but manually, can you help me with a script that reads each account and each database, (I know that this way it would give me the most accessible and direct files) (if it is the case)

I hope you understand me, and help me, thanks for your attention.

The information that you seek is in that files. You just need to understand what you are seeing.

Of course there are more files and directories that you don’t need.

If you want a custom script I can help you with that.

Do you host wordpress sites or a bit of everything?

1 Like

Hello, you tell me that the files are there, can you tell me how to extract them correctly?

Keep in mind that I am the one in charge of managing the servers, and if any pages are damaged, they will ask me for a backup, and I cannot send those current copies as they are not understandable by users or me.

As we indicated, the standard we are used to is that the backup when extracting shows the files of each domain of the account and also of each database.
This way the user can extract it to his machine and restore the website and database manually.

the files that these websites store are varied, they can be wordpres, joomla or any application that the user wants to mount.

For this reason, I would like the backup to be easy to read and understand.

If the current backups already have that information, please explain how to view it on my local machine, how can I view the database (.sql) how can I view the web files? (wordpress example: wp-content, wp-admin, index.php, etc…).

Or tell me or share a SCRIPT so I can do these backups automatically and in a way that works for me and my users (where website files are backed up, website database files , the e-mails)

Thanks for your attention

The first thing that you must undestand is that HestiaCP has no interest in being compatible with CPanel or other panels. I personally think this would be great but…

You can either:

  • Create your own scripts or hire someone to do it for you. I can do it for you if you want.
  • Use the hestiaCP system as is. In this case you can provide your (former) clients a manual to export their backups and import them back to CPanel or other hosting provider.

Here are the instructions to decompress a zstd file.

The directory structure matches the /home/user structure in hestia.

You will find

  • web domains in the web folder. You will have to look for the public_html folder which I don’t remember where it is.
  • and databases in the db folder your video shows clearly the database when you visit the db folder.

image

This looks like your database:
uversieducativa.dbwordpress.mysql.sql.zstd

Since hestiacp doesn’t match webs with databases you will have to choose the correct ones.

Thank you very much for the aclarations,
I had not understood the example of the way to extract from the colleague, I had to download this file (zstd for Windows download | SourceForge.net) and paste it in the path of the file to “extract”, I see which is a different extraction method but it works.

In this way I realize that the information of the websites if they are in the backup.

Thank you very much for your help and clarifications.

Greetings to all

1 Like

You can also change the backup method to “gzip” and it will become .tar.gz

How do I do that, is it in the panel? , you share a capture with me

Thank you

I see
thanks for you help

Yes …

hello, I have new doubts,
where do I configure what days the backups are made?
For example, I want the copies to be made every Saturday.

Where do I set retention? (or is it automatic?)
For example, did a package set you up with 2 backups, but they are generated on the same day? or it means that it will have the 2 backups of the last two Saturdays that you configure.

if I make myself understood?

Retention is the number of backups in a package

In the admin user there is a backup that currently runs every night if you want to change it update the cronjob so it runs every week on a Saturday

thanks, to validate, this is the crom that takes care of the backups?

no, one below.

1 Like

Hi, thanks for your help.

Can you help me with an additional problem? How can I disable the (mail() for PHP)?

since sometimes some bots use this means to generate spam, is there a way through the panel or directly through ssh? (in that case, what path would the file be in)

Google how to disable mail function