Direkt zum Inhalt

creating Grandfather-Father-Son?

Thread needs solution

I'm using a Custom schedule to try to get Grandfather-Father-Son backups.

Incremental: Mon, Tue, Wed, Thu, Fri, Sat
Differential: Sun
Full: Last Sun of each month

Note that I picked Incremental to not interfere/duplicate Differential or Full. However, I do not see how to set Differential to exclude the last Sun of each month so it does not interfere/duplicate Full?

0 Users found this helpful

Well, its a bit of a kludge, but here's how I've fixed this up, since it seems GFS is not available in 12 yet.

Full: last Sun of each month at 1am

Differential: 1st, 2nd, 3rd Sun of each month at 1am

Incremental: each M, Tu, W, Th, F, Sa at 1am; each 4th Sun at 12:15am

I did this since 5-6 times a year, there can be 5 Sun per month, and at least I'd get in some backup on those days.

Does v12 have a CLI so I can calculate the days and run whatever I please (Full, Differential, Incremental)?  I'm using the Cloud Console with Local Backup folders.

I assume that CLI and GFS features will be available in 12-Advanced when it arrives?

Hi

v12 have command line interface.  Here is a link to documentation - Command Line reference.

In v12 Advanced GFS will be available, but it will be based on Custom scheme, thus the same limitations will be applicable to GFS (inability to exclude last Sun of each month for Diff backup).

Thanks for your reply.

It is surprising that GFS is not implemented fully even in Advanced?  The code seems simple, e.g., to calc the number of Sun in a month:

## https://www.codeproject.com/Questions/292361/How-do-i-count-SUNDAYs-in-…

static int CountSundays(int year, int month)
{
    var firstDay = new DateTime(year,month , 1);

    var day29 = firstDay.AddDays(28);
    var day30 = firstDay.AddDays(29);
    var day31 = firstDay.AddDays(30);

    if ((day29.Month == month && day29.DayOfWeek == DayOfWeek.Sunday)
    || (day30.Month == month && day30.DayOfWeek == DayOfWeek.Sunday)
    || (day31.Month == month && day31.DayOfWeek == DayOfWeek.Sunday))
    {
        return 5;
    }
    else
    {
        return 4;
    }
}

 

OR

 

## http://stackoverflow.com/questions/21443631/total-number-of-sundays-in-…

function sundaysInMonth(start) {
    var d = new Date('1 ' + start); // May not parse in all browsers
    var ndays = new Date( d.getFullYear(), d.getMonth()+1, 0 ).getDate();
    return Math.floor((ndays + (d.getDay() + 6) % 7) / 7);
}