Checking the existance of destination directory

Questions about Cobian Reflector
marcel
Posts: 2
Joined: 06 Aug 2023, 20:18

Checking the existance of destination directory

Post by marcel »

Hi,
first of all, thanks, its a great tool, been using it since ... ages, now I would like to help to make it a bit better :)

If you are using compression function and putting your stuff into a ZIP archive, the ZIP is being created in the temporary area (usually in users directory structures) and afterwards the copy process from temp directory to the final destination takes place.
However, if the destination directory doesn't exist, the archive is being created whatsoever in temp, and once compression is done, Reflector tries to move the file - but here it fails, as expected.
The compression is, of course, the longest running part of the whole backup, so I would expect it to not start at all, if the whole backup process has no chance to succeed. Once the ZIP file is successfully built, but the destination doesn't exist, Reflector deletes it from the temp, game over.
I would appreciate if Reflector could check the destination directory before starting the compression, so user doesn't have to wait XY minutes just to find out it was wasted time and he's on the start again.

It happens to me many times, when I make backups on external drive, that the drive sometimes gets assigned different volume letter from OS Windows.
User doesn't have to notice such change, so a quick pre-check would come in handy. :OK

Here goes the log, so you can get better picture of whats happening:

Code: Select all

    2023-08-06 19:50:42 A backup has started...
    2023-08-06 19:50:42 Backing up the task "BKP-D-na-F-Transcend"
    2023-08-06 19:50:42 Applying the parameters to the task "BKP-D-na-F-Transcend" (if any).
    2023-08-06 19:50:42 Starting the copy. The user running the task is: marcel
    2023-08-06 19:50:42 The directory "C:\D" is being added to the monolithic archive...
    2023-08-06 19:59:50 Checking the archive "C:\Users\marcel\AppData\Local\Temp\61605226-8c79-4d62-b749-83ebfd736ff3\D.zip"...
    2023-08-06 20:02:32 The monolithic archive "D.zip" has been created. Files in archive: 19714. Folders: 2316. Ignored files: 0  Uncompressed size: 11.37 GB
    [b]ERR 2023-08-06 20:02:32 The destination directory "F:\bkp-D" couldn't be created: (3) The system cannot find the path specified: [F:\bkp-D][/b]
    [b]2023-08-06 20:02:33 The temporary directory "C:\Users\marcel\AppData\Local\Temp\61605226-8c79-4d62-b749-83ebfd736ff3" has been successfully deleted.[/b]
     
    2023-08-06 20:02:34 ** Backup for the task "BKP-D-na-F-Transcend" has ended **
    2023-08-06 20:02:34 ** Processed files: 19714. Backed up files: 19714. Created folders: 0. Backup size: 0 bytes. **
    2023-08-06 20:02:34 ** Number of errors: 1. Time elapsed: 0 hours, [b]11 minutes[/b], 51 seconds. **

Thanks,
marcel
User avatar
cobian
Site Admin
Posts: 4734
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Checking the existance of destination directory

Post by cobian »

Yes, I just though that the user should be sure to have a properly working temp dir, but I understand the issue. ;)
--
Luis Cobian
Cobian Backup's creator
marcel
Posts: 2
Joined: 06 Aug 2023, 20:18

Re: Checking the existance of destination directory

Post by marcel »

Thanks for quick reply. Actually its not the temp dir,, but the destination dir where my user (me) is not sure about :lol:
But then, why being minimalist, and not cover both for pre-check? :twisted:
User avatar
cobian
Site Admin
Posts: 4734
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Checking the existance of destination directory

Post by cobian »

:OK
--
Luis Cobian
Cobian Backup's creator
doorburritos
Posts: 1
Joined: 29 Aug 2023, 17:46

Re: Checking the existance of destination directory

Post by doorburritos »

marcel wrote: 07 Aug 2023, 19:43 Thanks for quick reply. Actually its not the temp dir,, but the destination dir where my user (me) is not sure about :lol:
But then, why being minimalist, and not cover both for pre-check? :twisted:
yes. i agree with you
lisapurnellsw
Posts: 2
Joined: 07 Sep 2023, 05:52

Re: Checking the existance of destination directory

Post by lisapurnellsw »

I currently have this problem at hand. I need to check if my source folder and my destination folder has exactly the same files by comparing it. Taylor Swift 2048
Malley
Posts: 1
Joined: 07 Sep 2023, 09:59

Re: Checking the existance of destination directory

Post by Malley »

doorburritos wrote: 29 Aug 2023, 17:50
marcel wrote: 07 Aug 2023, 19:43 Thanks for quick reply. Actually its not the temp dir,, but the destination dir where my user (me) is not sure about :lol:
But then, why being minimalist, and not cover both for pre-check? :twisted:
yes. i agree with you
:OK :OK :OK
katyswift468
Posts: 3
Joined: 31 Jul 2023, 05:08

Re: Checking the existance of destination directory

Post by katyswift468 »

Program claims it can not find the destination location even though my Folder Structure gets created before the file gets copied. Does anyone. Mapquest Directions
User avatar
cobian
Site Admin
Posts: 4734
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: Checking the existance of destination directory

Post by cobian »

If the destination is no found the copy cannot be done (with or without compression).

Be sure that the destination is found (on place if using some external storage, like USB discs, etc) or, i the destination is a network place, be sure that the user running the service has access to it.
--
Luis Cobian
Cobian Backup's creator
Dave999
Posts: 2
Joined: 10 Nov 2023, 10:14

Re: Checking the existance of destination directory

Post by Dave999 »

So there is no way to check if the backup destination is available before the backup starts?
I have tried some pre-backup events but none worked - the backup always started:
copy c:\file.txt \\NAS\backups\
dir \\NAS\backups\file.txt
net use \\NAS\IPC$
ping 192.168.0.100 (NAS IP)

Could you implement some of these checks?

Anyway, thanks for your great work! :APP
Post Reply