XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Full backup - new long-retention options

    Scheduled Pinned Locked Moved Backup
    15 Posts 5 Posters 142 Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ForzaF Offline
      Forza
      last edited by Forza

      Hi!

      I noticed there is a new retention option for the full backups. Very interesting and a long sought feature. How is this option supposed to be used with a backup schedule? Is the idea to schedule daily (or more frequent) backups, and then use the long-term retention options to prune backups so we do not have to keep so many?

      8811c695-61ba-4ecd-a27e-a388fc4e3033-image.png

      EDIT: Found the blog post about it. Though, I do not understand if the long-term retention overrides the retention set in the schedule. The screenshot from the blog has retention 1, which seems contradictory to the intention?

      1d5e6f0f-ac0b-4b5e-8c7b-ce0eda109a32-image.png

      Bastien NolletB 1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Question for @florent or @Bastien-Nollet

        1 Reply Last reply Reply Quote 0
        • Bastien NolletB Offline
          Bastien Nollet Vates 🪐 XO Team @Forza
          last edited by

          Hi @Forza,

          The long term retention is independent of the retention of the schedule: even with a backup retention of 1, the long-term retention will keep some backups separately.
          Note that the LTR applies to every schedule, so it may be preferable to use it with a single schedule.

          ForzaF 1 Reply Last reply Reply Quote 1
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Also adding @thomas-dkmt in case we need to update the doc to make it clearer

            1 Reply Last reply Reply Quote 1
            • ForzaF Offline
              Forza @Bastien Nollet
              last edited by

              @Bastien-Nollet said in Full backup - new long-retention options:

              Hi @Forza,

              The long term retention is independent of the retention of the schedule: even with a backup retention of 1, the long-term retention will keep some backups separately.
              Note that the LTR applies to every schedule, so it may be preferable to use it with a single schedule.

              Thanks for the quick feedback. Does it mean that the schedule's own retention is also honored separately in addition to the LTR?

              Bastien NolletB 1 Reply Last reply Reply Quote 0
              • Bastien NolletB Offline
                Bastien Nollet Vates 🪐 XO Team @Forza
                last edited by

                @Forza said in Full backup - new long-retention options:

                Thanks for the quick feedback. Does it mean that the schedule's own retention is also honored separately in addition to the LTR?

                Yes, a backup is kept if it matches one of the retention criteria, either the schedule's retention or the LTR. (the backup is not duplicated, we just check for both criteria to know if we should keep the backup or not)

                P ForzaF 2 Replies Last reply Reply Quote 2
                • P Offline
                  Pilow @Bastien Nollet
                  last edited by

                  @Bastien-Nollet said in Full backup - new long-retention options:

                  Yes, a backup is kept if it matches one of the retention criteria, either the schedule's retention or the LTR. (the backup is not duplicated, we just check for both criteria to know if we should keep the backup or not)

                  Could we have an option to choose wich LTR day from month to keep ?
                  and even for weekly, what weekday ?

                  Bastien NolletB 1 Reply Last reply Reply Quote 1
                  • Bastien NolletB Offline
                    Bastien Nollet Vates 🪐 XO Team @Pilow
                    last edited by

                    Hi @Pilow,

                    This is not possible at the moment, but it's a feature we plan to add in the following months.

                    Bastien NolletB 1 Reply Last reply Reply Quote 1
                    • ForzaF Offline
                      Forza @Bastien Nollet
                      last edited by

                      @Bastien-Nollet said in Full backup - new long-retention options:

                      @Forza said in Full backup - new long-retention options:

                      Thanks for the quick feedback. Does it mean that the schedule's own retention is also honored separately in addition to the LTR?

                      Yes, a backup is kept if it matches one of the retention criteria, either the schedule's retention or the LTR. (the backup is not duplicated, we just check for both criteria to know if we should keep the backup or not)

                      With that in mind, how would the following schedule be executed? Will we keep 52 weekly, 24 monthly and 5 yearly backups?
                      99392fa5-ca7f-4d07-b1cc-efaa0fdcd578-image.png

                      P 1 Reply Last reply Reply Quote 0
                      • P Online
                        ph7 @Forza
                        last edited by

                        @Forza
                        I started experimenting with this function in dec -24 and have run it in "production" in my homelab since jan -25
                        I suggest You keep the Backup retension (52) to 1.
                        this is my setup
                        e080cadf-7ad0-48e1-aac5-72bfbec88900-image.png

                        Sequence
                        9a7ab8d6-057a-459e-b026-657580a47116-image.png

                        Schedules
                        541c3859-b8bf-4230-bc49-871d1fdc0897-image.png

                        And this is the result from one of my VMs
                        da4b3ef8-3abc-4663-b287-d87cbe98f152-image.png

                        e1040285-6f50-42c3-af90-052774bc8ecf-image.png

                        As You can see all the backups from jan - apr and most of may are removed

                        I am waiting to see what will happen when we go into 2026, If I remember correctly,there was some bug at 2024 -> 2025 but hopefully I get my first yearly backup

                        1 Reply Last reply Reply Quote 0
                        • Bastien NolletB Offline
                          Bastien Nollet Vates 🪐 XO Team @Bastien Nollet
                          last edited by Bastien Nollet

                          @Forza As your backup tasks executes only once a week, the schedule retention is redundant with using "Number of weekly backups kept" of LTR.

                          If keeping the last 52 weekly backups of this job is what you want, I recommend you to set the schedule retention to 1, and the number of weekly backups kept to 52. This way, if you happen to execute this backup job manually (in addition to its schedule), it will not delete the oldest backups.

                          P ForzaF 2 Replies Last reply Reply Quote 0
                          • P Offline
                            Pilow @Bastien Nollet
                            last edited by

                            @Bastien-Nollet where did u see his backup executing once a week ?
                            I see everyday, full on sunday ?

                            i'm discovering a new way of LTR.

                            we should keep retention to 1, and manage the LT points in the form below ? days included ?
                            as of now, I gave retention 7 days, and then only put numbers in weeks/months but the results were inexpected... 😕

                            Bastien NolletB 1 Reply Last reply Reply Quote 0
                            • Bastien NolletB Offline
                              Bastien Nollet Vates 🪐 XO Team @Pilow
                              last edited by

                              @Pilow I was replying to Forza, who has only one schedule with cron pattern 5 18 * * 0. I edited my message to make it clearer that I wasn't talking of ph7's backups.

                              What you did seems totally fine to me.
                              Could you detail a bit more what was unexpected in the results, and share a screenshot of your backup job retention/LTR configuration, so there is no misunderstanding?

                              P 1 Reply Last reply Reply Quote 0
                              • P Offline
                                Pilow @Bastien Nollet
                                last edited by

                                @Bastien-Nollet here is the config of the BACKUP job :
                                95912a70-912d-49fb-8d68-1277beaa9407-image.png

                                to the remote DC1-REMOTE01

                                you would expect 10 points after 1month+ of forver incremental backups ?
                                7 daily, 2 weekly, and 1 monthly

                                but I only get 7 points in this remote (the last 7 days)

                                I have a mirror copy job, 14 points retention, no LTR, to a remote called DC2-REMOTE01-COPYDC1, i get my exact 14 points.

                                b944fdef-693a-4de6-bfaa-9c758cf8a0e2-image.png 680c5ed9-df13-4a32-9703-8fd36464bc2c-image.png

                                so i guess, i do not profit from LTR ?
                                is that because i didnt put something in DAYS ? or because my retention is >1 ?
                                backups are executed daily by SEQUENCE.

                                1 Reply Last reply Reply Quote 0
                                • ForzaF Offline
                                  Forza @Bastien Nollet
                                  last edited by Forza

                                  @Bastien-Nollet said in Full backup - new long-retention options:

                                  @Forza As your backup tasks executes only once a week, the schedule retention is redundant with using "Number of weekly backups kept" of LTR.

                                  If keeping the last 52 weekly backups of this job is what you want, I recommend you to set the schedule retention to 1, and the number of weekly backups kept to 52. This way, if you happen to execute this backup job manually (in addition to its schedule), it will not delete the oldest backups.

                                  Thanks for the feedback. I included that difference (52 in the schedule and 12 in the LTR) on purpose in the screenshot because I wanted to know what takes presendece here, the 12 weeks, or 52 weeks.

                                  I have not yet enabled LTR, but am considering it for this backup job so that I can keep 52 weeks, 24 months and 5 yearly.

                                  Now I wonder if each dailym weekly, monthly and yearly option are sequential to the previous, or if all counts from 0?

                                  Will it mean that I have:

                                  • year 1: 52 weekly
                                  • year 2: 12 monthly
                                  • year 3: 12 monthly
                                  • year 4: 1 yearly
                                  • year 5: 1 yearly
                                  • year 6: 1 yearly
                                  • year 7: 1 yearly
                                  • year 8: 1 yearly

                                  Or will I get:

                                  • year 1: 52 weekly + 12 monthly + 1 yearly (at the end of year 1)
                                  • year 2: 12 monthly + 1 yearly
                                  • year 3: 1 yearly
                                  • year 4: 1 yearly
                                  • year 5: 1 yearly
                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post