RFE: Wrapper issues requests for Cobian Reflector

Questions about Cobian Reflector
Post Reply
Todd
Posts: 181
Joined: 01 Nov 2021, 23:30

RFE: Wrapper issues requests for Cobian Reflector

Post by Todd »

Dear Cobian,

This one you may wish to keep as a private dialogue between the two of us.

First, who/what am I: I am a computer consultant (BSEE Electronics and computer engineering). I have Cobian Backup spread across two Counties here in Nevada USA. The reason why I use Cobian is the ease in recovering after a disaster hits. Other backup softwares, with their proprietary archives, are always out of date (if the even exist -- customer DO NOT check, which is why I love your log reports ) and are no longer supported by the vendor and require you send the archive to them to crack. It makes for tons of lost hours, expense, and down time. And Cobian has everything I need in it and it works very nicely (well, except the database). And I adore your work.

All of the code I have written and discussed here will be made available to you if you would like it.

The main issues I have with Backup is that it the database does not like multiple revolving media. I have my customer rotate (usually flash) drives to work around ransomware encrypting backup drives. And in Backup post events I eject the drive to make it even harder on the criminals. (Sometimes the user failed to rotate the drive and the drive won't work a second time with it being physically removed and reinserted.) And when backing up to fixed drive the database fails after a month or two as well.

My solution is to "wrap" Backup with program I wrote in Raku (perl 6). I tell Backup to write to "[label]:\MyDocsBackups\backup1". (I would to a directory with a date as the name, but I have no way of telling Backup the location.) Then I rotate the directories myself. Backup1-> Backup2, etc. up to the limit. Limit plus one gets deleted. Backup1 is then recreated as a blank directory. The wrapper also does things like scanning the drive for errors (chkdsk) and correcting them. And popping up an error message is the backup drive can not be located, etc.. I also have an option to kill a number of programs that do not use volume shadow copy. Basically a bunch of house keeping.

You will note that my solution does not use a database and does not care about when things were backup up.

Here is the run line help output:
C:\NtUtil>raku CobianWrapper.pl6 --help
Welcome to CobianWrapper.pl6

CobianWrapper.pl6 usage:

CobianWrapper.pl6
--backup_path <path to backup directory>
Drive letter or partition label plus path to backup directory.
for a label, surround the label with square brackets [].
Note: the backup directory name must end in a 1
--rotates <number of rotates>
--nokill
nokill will disable the killing of programs known to be
Shadow Copy (VSS) unfriendly
--debug
--help

Defaults:
--backup_path [BACKUP]\MyDocsBackup\backup1
--rotates 2

--nokill False
--debug False
--help False

For example
C:\rakudo\bin\raku C:\NtUtil\CobianWrapper.pl6 --rotates 6 --backup_path A:\
MyDocsBackup\n\backup1
C:\rakudo\bin\raku C:\NtUtil\CobianWrapper.pl6 --rotates 4 --backup_path [BA
CKUP]\MyDocsBackup\backup1

more? (y/n) y

Sample Cobian Pre-backup Event call to CobianWrapper.pl6:
COMMANDLINE,"C:\rakudo\bin\raku.exe C:\NtUtil\CobianWrapper.pl6 --rotates 20
--backup_path [BACKUP]\MyDocsBackup\backup1",true

Sample Cobian File, Destination for use with CobianWrapper.pl6:
%DISKLABEL="BACKUP":\MyDocsBackup\backup1

Sample Cobian Post-backup Event call to CobianWrapper.pl6 (requires USB_Disk_Eje
ct-1.3.0.3.exe):
COMMANDLINE,"C:\NtUtil\USB_Disk_Eject-1.3.0.3.exe /REMOVELABEL BACKUP",true

Suggest Cobian Backup settings:
--> Tools (pull down)
--> Options
General (left Column):
uncheck: Log new version as error
uncheck: Check for Updates
Log (left Column):
Mail log files
uncheck: Send as attachment
When to mail: Mail after every task
Visuals:
Show numbers in progress bars
Advanced:
Communications (tab):
IPC timeout: change from 180_000 to 3_600_000
I also have written one in Perl 5 for rotating ftp directories. (Raku's ftp module is corked.) Problem is that do to some weird file names that folks use, like Firefox, crash the "block" recursive directory delete. If happens, I drill through each directory in the tree and rename to what will delete and delete them. It is a wild ride watching the kill and delete subroutine call itself over and over.

Things that you could do to help me with the wrapper are:

1) allow me to add things to the log. I can write a separate file out for you to look for and append to your current log. That way any errors I pull will be reported: drives not found, chkdsk corruptions, directories that did not rotate, full drives (a future implementation), etc.. Or allow me to directly append to your log.

2) allow me to send a kill command back to you that would cancel the backup and send a log saying such. Including my log would really help.

3) allow me to call out the backup location as a run line parameter to your program so I could supply a dated directory name/scheme.

Many thanks,
-T
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: RFE: Wrapper issues requests for Cobian Reflector

Post by cobian »

Thanks!

A. You can backup to a label if you use the parameter %DISKLABEL


I'll see what I can do with all other functions.
--
Luis Cobian
Cobian Backup's creator
Todd
Posts: 181
Joined: 01 Nov 2021, 23:30

Re: RFE: Wrapper issues requests for Cobian Reflector

Post by Todd »

I am not seeing how to send %DISKLABEL to Reflector via the command line.

This would be cool as I could label backups flash drive with BACKUP1 through BACKUP5 for a five day rotation of flash drives. My wrappers is currently capable of finding drive labels with wild cards in them. And having the flash drives labelled this way would make it a lot easier to hunt down a defective flash drive. Also, it would allow me to bust, sorry, inform customer's that were not rotating their flash drives.
Todd
Posts: 181
Joined: 01 Nov 2021, 23:30

Re: RFE: Wrapper issues requests for Cobian Reflector

Post by Todd »

Todd wrote: 04 Dec 2021, 19:54 I am not seeing how to send %DISKLABEL to Reflector via the command line.

This would be cool as I could label backups flash drive with BACKUP1 through BACKUP5 for a five day rotation of flash drives. My wrappers is currently capable of finding drive labels with wild cards in them. And having the flash drives labelled this way would make it a lot easier to hunt down a defective flash drive. Also, it would allow me to bust, sorry, inform customer's that were not rotating their flash drives.
A complicated/complex work around would be for a five flash drive rotation to clone the task five times and alter the labels for each flash drive. Then have my wrapper use wild card find the flash drive and then run the task for that label. And add %TASKNAME to the report's subject line to identify which task was run
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: RFE: Wrapper issues requests for Cobian Reflector

Post by cobian »

If the rotation is daily, try using the %CCFORMATDATETIME with the format dddd and name USB drive with the names of the week.
--
Luis Cobian
Cobian Backup's creator
Post Reply