How to create hourly backup for a proxmox vm on PBS?

kumarullal

Active Member
Jun 17, 2009
178
0
36
LA, USA
Hi,
First of all congratulations on coming out with a fantastic solution. I installed PBS on a physical server and setup a backup storage and added it to my Proxmox ve node.
From the GUI it gives you the same options are vzdump backup. You can only select days and time for a automatic backup to run. The first backup is of course a full backup, which takes time. But the subsequent incremental backups happen in seconds. The trouble i that it only backs up once a day like vzdump, but incrementally. In PBS gui, on the storage, if we select a vm backup, check the pruning options for that backup, I can specify retention policy that includes daily, hourly , monthly and yearly, but there is no way to configure the backup schedule to hourly or every half hour etc.
I saw somewhere in the documentation that on PBS the is a command "proxmox-backup-server" with "--gc-schedule" option. However, there are re are no examples on how to use it. If there are a few examples of using the "proxmox-backup-server" command options to backup hourly, monthly and yearly , that would be great.
For now, I just want to try running hourly backups, and maintaining last 6 hourly backups.
How do I do that?
 
Last edited:

villain666

Member
Oct 4, 2012
21
4
23
Hi,
First of all congratulations on coming out with a fantastic solution. I installed PBS on a physical server and setup a backup storage and added it to my Proxmox ve node.
From the GUI it gives you the same options are vzdump backup. You can only select days and time for a automatic backup to run. The first backup is of course a full backup, which takes time. But the subsequent incremental backups happen in seconds. The trouble i that it only backs up once a day like vzdump, but incrementally. In PBS gui, on the storage, if we select a vm backup, check the pruning options for that backup, I can specify retention policy that includes daily, hourly , monthly and yearly, but there is no way to configure the backup schedule to hourly or every half hour etc.
I saw somewhere in the documentation that on PBS the is a command "proxmox-backup-server" with "--gc-schedule" option. However, there are re are no examples on how to use it. If there are a few examples of using the "proxmox-backup-server" command options to backup hourly, monthly and yearly , that would be great.
For now, I just want to try running hourly backups, and maintaining last 6 hourly backups.
How do I do that?

Create new crontab job by hand (as example use disabled backup job from interface PVE)

*/30 * * * * root vzdump 102 11003 .......
example for half-hour vzdumps
 
  • Like
Reactions: DerDanilo

kumarullal

Active Member
Jun 17, 2009
178
0
36
LA, USA
Create new crontab job by hand (as example use disabled backup job from interface PVE)

*/30 * * * * root vzdump 102 11003 .......
example for half-hour vzdumps


I wanted to clarify one thing. When we use the GUI in pve, there is a file vzdump created in /etc/cron.d with a symlink, pointing to /etc/pve/vzdump.cron
So Are you saying that I create another backup job in PVE using the GUI and select the same storage and VM tobackup everyday, and then uncheck it so that the backup is not used and then manually edit the /etc/pve/vzdump.cron and modify the second entry as per my needs?
Or I just create a new file in /etc/cron.d/ and call it anythng with the entry that I need?
 

Peter123

Member
Mar 5, 2018
38
2
13
51
No, unfortunately not, as all of the above suggestions result in the GUI no longer showing any scheduled time at all.

Actually, the integration into the GUI for the Proxmox developers shouldn't be a big problem, right?
 
Last edited:

oversite

Active Member
Jul 13, 2011
98
16
28
No, unfortunately not, as all of the above suggestions result in the GUI no longer showing any scheduled time at all.

Actually, the integration into the GUI for the Proxmox developers shouldn't be a big problem, right?
you are aware of it's being open source right? i know patches are always welcome. It's very easy for someone not doing it saying it's easy.
 
  • Like
Reactions: guletz and che

che

Member
Jul 10, 2020
103
22
18
Actually, the integration into the GUI for the Proxmox developers shouldn't be a big problem, right?
It is probably not, but their resources are limited... And there are things with higher priority. I mean have you seen how much stuff is going on on the devel mailing lists...
 

stefanobertoli

New Member
Apr 25, 2020
15
0
1
40
Look like stupid, in my opinion, if you don't want to put your hand in cron files, just set multiple backup jobs in GUI, each one at the hour you need ;)
 
May 4, 2021
1
0
1
41
I know this has been asked for already, but just adding my vote for being able to do this through the GUI. And if directly editing the CRON job is still the way to go, then at least don't break the GUI - as soon as I edited the vzdump file, the schedule disappeared from the GUI. The sad part is this is already working in the Tape backup section of Proxmox Backup Server, but still not in the Datastore section.
 

Adamg

New Member
Feb 8, 2020
5
1
3
39
Just tried out the proxmox backup server, loving it within 2 days, I'm very impressed with the speed after the initial backup and I love the remote sync option so that I can now start to have offsite backups too.

I found my way to this forum while trying to set up backups every hour of maybe every 15 mins since it works so well. I'd like to throw my vote in that it would be very nice if the GUI could accept cron like schedules. Thanks!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!