Hello,
I'm looking for a way to elegantly have a weekly chained backup to two different switching target folders. The " $2WEEKSDAYS" variable comes close. But due to the fact that the chained backups might take longer, the weekdays the idividual backups start are not set. I was woundering if there is some variable one youd use fpr odd and even weeks of the year?
Regards, Lars
Backup once every 2nd week
Re: Backup once every 2nd week
Hello,
sorry for the delay, it is possible with a PascalScript. I will post one ASAP.
sorry for the delay, it is possible with a PascalScript. I will post one ASAP.
Re: Backup once every 2nd week
Hi,
I would still be interested in a possible sollution?
Regards, Lars
I would still be interested in a possible sollution?
Regards, Lars
Re: Backup once every 2nd week
Hello,
again sorry for the delay. I can send you a script and/or Syncovery update today.
So the destination path would alternate every 7 days between for example
D:\Data\ODD
and
D:\Data\EVEN ?
Is that correct? Or how would you like the odd/even folders named?
Also, does your week start on a Monday or Sunday?
again sorry for the delay. I can send you a script and/or Syncovery update today.
So the destination path would alternate every 7 days between for example
D:\Data\ODD
and
D:\Data\EVEN ?
Is that correct? Or how would you like the odd/even folders named?
Also, does your week start on a Monday or Sunday?
Re: Backup once every 2nd week
Hello,
OK here's a sample script that adds ODD and EVEN to the end of the right-hand path, alternating every 7 days. It's not necessarily the same odd/even of the official week of the year, but it alternates correctly across years.
In this function, a new week starts every Monday.
If the right-hand path uses forward slashes, such as for FTP or cloud paths, you need to replace the backslashes in the function with forward ones.
OK here's a sample script that adds ODD and EVEN to the end of the right-hand path, alternating every 7 days. It's not necessarily the same odd/even of the official week of the year, but it alternates correctly across years.
In this function, a new week starts every Monday.
If the right-hand path uses forward slashes, such as for FTP or cloud paths, you need to replace the backslashes in the function with forward ones.
Code: Select all
function OnGetProfilePathBeforeListing(const isRightSide:Boolean;
var Path,UserName,Password:UnicodeString;
var AuthKey,AuthKeyPassword:AnsiString;
var Port:Integer):Boolean;
var today:Integer;
begin
if isRightSide then begin
today:=Trunc(Now)-2;
if (today div 7) mod 2=1 then
Path:=ConcatPathWithDelim(Path,'ODD','\')
else
Path:=ConcatPathWithDelim(Path,'EVEN','\');
end;
Result:=true;
end;
Re: Backup once every 2nd week
Tank you! I will have a look and test it.