Few newbie questions about HestiaCP (Backup and cron jobs)

Good day everyone, hope you’re doing well today. I just need some clarifications as a newbie. Hope you guys don’t mind:

  1. I see that the admin account has default cron jobs including [sudo /usr/local/hestia/bin/v-backup-users] which I think the auto backup for all users as per the documentation. But I am confused if that script backups other additional users in the server or just the domains or websites, mails, dbs and ftp accounts including the system files in that particular admin account. Please enlighten me.

  2. If the default auto backup cron job in the admin account doesn’t backup other user accounts we create as additional users, how do we schedule a backup for it. Should we copy the cron jobs from the admin user account or just this sudo /usr/local/hestia/bin/v-backup-users or without the “s” (sudo /usr/local/hestia/bin/v-backup-user), I’m confused between the two. When do we use the “sudo /usr/local/hestia/bin/v-backup-users” and the “sudo /usr/local/hestia/bin/v-backup-user” (or the script with the “s” and without it).

  3. Is there a script to setup all the default cron jobs from the admin user to the new additional users? So I don’t have to manually copy and paste it if it’s necessary.

Thank you all for your help. God Bless, everyone.

Hi @mauamolat,

That script backups all Hestia users (if the package used by those users have backups configured), not only the admin user.

For questions 2 and 3, you don’t need to add any cron job to your users so no need to perform any action on the users’ side.

So you mean it is enough to just use the default settings, let’s say when I am migrating my server to another host with the same hestia setup

If I restore the admin account, will it also restore all the additional users along with its domains, mail and etc.?

Thanks, man.

No, if you restore admin backup it will restore all the web, domains, conf, etc only for the admin user. You should also restore every user’s backup.

Oh, really? So, just to clarify, this command in the cron jobs of the admin “sudo /usr/local/hestia/bin/v-backup-users” will let me do auto backup for the other users in my Hestia server, right? I mean the additional users. But their backups will be stored within their user account, and not under the admin account. Please correct me if I’m wrong

Yes, tha’s right.

If you are using local storage then all the backups for all users are saved under the directory /backup/

1 Like

but why isn’t it showing on the dashboard https://i.imgur.com/cdP0ace.png

Backup runs once a day at 05:10 AM, maybe you created the users today?

I created the users a few days ago. But wait, I have another confusion. Does the auto backup setting in cron for the admin account backups all the users each run or does it just do for 1 user each schedule?

It backups all users each schedule.

Thank you man. If you’re familiar, how much time does it take to backup a 1GB User in hestiacp?

It will depends on the number of files, your cpu, your ram, your disk… but usually in a modern server it should take 1 or 2 minutes.

If you are not seeing the backups, check the notifications because maybe there is a problem with some of them. You could also run the command manually (with user root):

v-backup-users
1 Like

What does this command do? I am seeing it now when it’s done, I am seeing the logs in backup folder, seems like it’s still in progress. Thanks man, you’re the best!!!

That command is the same command launched by Hestia to backup all the users. Also, if your cpu is under load, the backup will wait till it decreases to start the backups.

It checks the number of processors in your cpu:

grep -c '^processor' /proc/cpuinfo

And then checks the load average of your server:

cat /proc/loadavg | cut -f 1 -d ' ' | cut -f 1 -d '.'

If the load average is greater or equal to the number of your processors, then it waits 60 seconds in a loop before start the backups.

1 Like

Thank you very much man for the clarifications. You’re awesome!!!

2 Likes

My backups were set (the default setting) in cron, but didn’t work until I changed the time. Just FYI.