Jump to content

Stuck in BackupPC script


Recommended Posts

Hi Benners,

First of all thanks for helping on this project...really appreciate it !!

I tried your code but seems some cross check is still missing from it. Code does not continue where we left still as it gives error while copying from where we left, i have gathered screenshot ...please go through it once

I tried to stop script at copying firefox folder and attached are the results.

 

backup tool.docx

Link to comment
Share on other sites

I tried before I posted the script and had no problems. My process is,

  • Run program
  • Select backup location (folder on another  drive D:\Test\Normal)
  • Run backup
  • Select another folder (folder on another  drive D:\Test\Stopped)
  • Open task manager
  • Run backup and terminate the process tree using Task Manager
  • Run Program
  • Confirm resume operation
  • When done use BeyondCompare to check both directories. No differences shown

I have change the file copy to use _WinAPI, this might give a better indication of why the file copy fails. See updated script

 

Edited by benners
uploaded right file
Link to comment
Share on other sites

Thanks Benners

Issue was with firefox ...seems it has to be killed before we start copying firefox profile...but no issues i added code into it and now its working. I also tried to compare files after copying and its seems to be good.

One thing which seems i could not understand in that code is....about functionality of compressing files. As i said previously Whenever compress option is selected it should compress all folders somewhere in laptop temp path and compress it....then it should paste it in destination (i used 7zip in my code)... it was like backup.exe created. Please let me know if i misunderstood your code.

Can you please check that too....thanksssss

Link to comment
Share on other sites

Yep, the compress code isn't finished. I was looking at ways of adding the files to an archive instead of copying, then adding, just to save some time. If your code for compressing is working then just use that.

I will have a play and post here later

Link to comment
Share on other sites

Thanks benners for the code

Its my mistake....i could have brief more on it (compression code)

See, currently all folders are being copied directly to destination folder when no compression is selected. Requirement is when compress option is selected then there should not be any folder copied to destination folder it should only copy "Backup.exe" to destination folder, backup.exe is the compressed version of source data we selected. All folders which were being copied on destination folder when compression option is not selected should first be copied in temp directory and compressed ...through compression we will get backup.exe and that backup.exe should be copied on destination folder. All folders which are in temp folders should be deleted after they are compressed and backup.exe is copied to destination folder.

 

Please let me know if i missed something....i know i have become headache for you though :)

Link to comment
Share on other sites

All folders which were being copied on destination folder  should first be copied in temp directory and compressed if compression mode is selected ...through compression we will get backup.exe and that backup.exe should be copied on destination folder.

 

And yes this will be the last help for this code...thanks

 

Link to comment
Share on other sites

You aren't a headache. That's what this forum is for. People help if they want or have the time.  You have provided feedback and code which is more than a lot do. Sometimes you'll see posts where people would rather ask a simple question and wait hours for a reply, than just try what they are asking. They are the ones I blacklist :mad:

It won't be the last post, I'm sure. Once it's working you start to think, mmm I'll add more logging, try to improve speed, improve the code or coding when you see ways others have done it, so don't bother about asking.

I have updated the script and commented the process. It now copies to a temp dir if compression is required and the backup.exe is saved in the destination dir. If you can learn from it like I have learned from others then it's not been a waste.

Benners Backup.au3

Edited by benners
Link to comment
Share on other sites

12 hours ago, hiteshluthraauto said:

 

Much Appreciated Sir,

Thanks for understanding

I tried code and its working as expected but seems while compressing its getting failed and not copying backup.exe (compress file) in destination dir...seems something is missing still. I am attaching backup.log file for clarity. Logically seems it correct but some miss in the code...

I should undoubtedly appreciate that code to neat and improved a speed a lot if i compare it with my code. Seems i coded multiple logics and got failed somehow :)...got self puzzled.

Backup.log

Link to comment
Share on other sites

Looking at the log. the 7zip files aren't being copied to the temp folder. You need to check they are in the Tools folder which should be in the same dir as the script. 

A successful backup log should be similar to the one below

Backup.log

I also noticed there is a 1 appearing in the temp file path

C:\Users\ah0126953\AppData\Local\Temp\1\7zip

Don't know how that's getting there if the code is still

Local $s_7zip = @TempDir & '\7zip'

 

Edited by benners
Link to comment
Share on other sites

Thanks Benners,

I sorted that one with your clue given, and its now working if i do backup and do not interrupt script

But seems one thing is missing still....lets say i have selected compress backup and in between  i stopped script...then when i reopen script and click yes to continue where i left it starts copying pending folders to destination dir rather then continue saving it in temp dir and then compress it and creating backup.exe file...then copy to destination folder. Also it does not start compressing it. I am attaching steps and hope it helps here to understand. Seems loop problem here.

Steps.docx

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...