We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Cron : Delet Backup + Free Cached Memory
-
- Posts: 19
- Joined: Thu Dec 01, 2016 8:53 am
Cron : Delet Backup + Free Cached Memory
Hello guys,
I would like to know if there is a way to creat 2 cron job :
The first is for delet backup old than 24hours & the third is too creat a cron job that will free the cached memory.
I've found 2 old thread talking about it but I don't know if they are still working with the last version of vestacp and debian.
Thanks
I would like to know if there is a way to creat 2 cron job :
The first is for delet backup old than 24hours & the third is too creat a cron job that will free the cached memory.
I've found 2 old thread talking about it but I don't know if they are still working with the last version of vestacp and debian.
Thanks
Re: Cron : Delet Backup + Free Cached Memory
Have you try adding the cron job from the UI? You can add cronjob that run as with priviledges under the admin account by adding sudo in front of it. Just buy the file manager and you can edit your bash script from the UI too.
Add new file under /home/admin/bin/yourscript.sh and change permission to make it executable.
Setup the job in the UI to: /home/admin/bin/yourscript.sh
or: sudo /home/admin/bin/yourscript.sh
1) What do you mean clear cache? There is already a cron job that install with your php that clear your session.
2) As for deleting file olders than x days, why? VESTA already handle this for you and it does it very well. By default, it keep the last 3 backups per user - see: /usr/local/vesta/data/users/username/user.conf - variable BACKUPS if you want to change this value.
Add new file under /home/admin/bin/yourscript.sh and change permission to make it executable.
Setup the job in the UI to: /home/admin/bin/yourscript.sh
or: sudo /home/admin/bin/yourscript.sh
1) What do you mean clear cache? There is already a cron job that install with your php that clear your session.
2) As for deleting file olders than x days, why? VESTA already handle this for you and it does it very well. By default, it keep the last 3 backups per user - see: /usr/local/vesta/data/users/username/user.conf - variable BACKUPS if you want to change this value.
-
- Posts: 19
- Joined: Thu Dec 01, 2016 8:53 am
Re: Cron : Delet Backup + Free Cached Memory
Hi
I've just restarded my vps and I already have almost 2gb in the cached memory
I'm talking about the cached memory , when I use glances , I have a lot of memory cached1) What do you mean clear cache? There is already a cron job that install with your php that clear your session.
I've just restarded my vps and I already have almost 2gb in the cached memory
Ok thanks I'm gonna delet the cron instead , because backup are taking to many space on my vps, also can I manualy delet all the files inside the backup folder ?2) As for deleting file olders than x days, why? VESTA already handle this for you and it does it very well. By default, it keep the last 3 backups per user - see: /usr/local/vesta/data/users/username/user.conf - variable BACKUPS if you want to change this value.
Re: Cron : Delet Backup + Free Cached Memory
Try adding this to your cronjobsSimpleSample wrote:HiI'm talking about the cached memory , when I use glances , I have a lot of memory cached1) What do you mean clear cache? There is already a cron job that install with your php that clear your session.
I've just restarded my vps and I already have almost 2gb in the cached memory
Code: Select all
sync; echo 3 > /proc/sys/vm/drop_caches
Re: Cron : Delet Backup + Free Cached Memory
You can safely delete those. It appear that you do not have any backups? Otherwise, you would have files like username.tar.gz. Check to see what's causing your backup to fail. Those tmp folders should not be there longer than a couple of hours unless your backup is failing.SimpleSample wrote: Ok thanks I'm gonna delet the cron instead , because backup are taking to many space on my vps, also can I manualy delet all the files inside the backup folder ?
Also, there is a couple of known issue with backup failing due to some bugs ref:
https://github.com/serghey-rodin/vesta/issues/1035
viewtopic.php?f=41&t=13286
and if you're running postgresql 9.5 then here: https://github.com/serghey-rodin/vesta/issues/913
-
- Posts: 19
- Joined: Thu Dec 01, 2016 8:53 am
Re: Cron : Delet Backup + Free Cached Memory
Thanks , I've deleted those folders , the backup is disable so it's should be ok now.You can safely delete those. It appear that you do not have any backups? Otherwise, you would have files like username.tar.gz. Check to see what's causing your backup to fail. Those tmp folders should not be there longer than a couple of hours unless your backup is failing.
Also, there is a couple of known issue with backup failing due to some bugs ref:
https://github.com/serghey-rodin/vesta/issues/1035
viewtopic.php?f=41&t=13286
and if you're running postgresql 9.5 then here: https://github.com/serghey-rodin/vesta/issues/913
I'm gonna check the github & the topic
I've created a cron job but I think that not workingTry adding this to your cronjobs
Code: Select all
sync; echo 3 > /proc/sys/vm/drop_caches
I've try to run the command with putty instead of the cron job , and I have a persmission denied even with a sudo & log as root
Re: Cron : Delet Backup + Free Cached Memory
I would suggest against it - see here: http://serverfault.com/questions/597115 ... s-in-linux
I've been working with linux for a long time and never really have to use this drop caches method.
If you're running into a problem:
1) Figure out what is causing the problem. #1 rule of thumb is to look at system logs and stats.
2) If all else failed is because you're hitting your limit so just get/buy more memory.
I've been working with linux for a long time and never really have to use this drop caches method.
If you're running into a problem:
1) Figure out what is causing the problem. #1 rule of thumb is to look at system logs and stats.
2) If all else failed is because you're hitting your limit so just get/buy more memory.
-
- Posts: 19
- Joined: Thu Dec 01, 2016 8:53 am
Re: Cron : Delet Backup + Free Cached Memory
Hellonoogen wrote:I would suggest against it - see here: http://serverfault.com/questions/597115 ... s-in-linux
I've been working with linux for a long time and never really have to use this drop caches method.
If you're running into a problem:
1) Figure out what is causing the problem. #1 rule of thumb is to look at system logs and stats.
2) If all else failed is because you're hitting your limit so just get/buy more memory.
It's seems like my problem is solved I don't really know why, but my ram issue is gone
Thanks for your time guys