-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backup.ps1 is freezing - maybe recycle bin related #25
Comments
I did some googling and apparently the problem is in this line: This command waits for a confirmation that never arrives. |
So, the weird thing is i have never had this problem on 10+ of my systems. How are you running |
I'm running it through Task Scheduler, with my account with administrator role. I don't think it's related to permissions because I removed the If/Else statement so the following line would be called in any system: Now everything works just fine, except that the log files are deleted instead of moved to the recycle bin. |
I installed your script in another system and got the exact same error, but now I know what is going on. The Recycle Bin has an option to show a confirmation dialog before sending files to it. This was on by default since the Recycle Bin was created on Windows 95. Somewhere on the road, Microsoft changed the default (Windows 8 if I recall correctly). I didn't like the new default. It is too easy to delete files by mistake in Windows Explorer, so I set all my systems to show the confirmation dialog. Actually it is an option that is now ported with the Microsoft account, so I don't even have to configure it in every machine. So, when your script runs with the Recycle Bin confirmation option active, it will stop and wait for the confirmation forever. The confirmation dialog doesn't actually show up since the script is running unattended. Besides this issue, I have other suggestions, that maybe belong in another thread, but they are not exactly issues like:
|
I like not having to confirm so much <3. Anyway, thanks so much for keeping at this, and figuring it out in the end. Will try to fix it somehow, now that the actual issue is discovered.
I could add an option for this, but i'm against enabling it by default. If something bad happens, i would totally like to know it, even if it happened 1 year ago.
The way i'm using notifications is I'm interested in the name of the folder. That tells me though about the machine. What would you like to see? the hostname? |
Yes, the hostname would work for me. I have the same path on both machines I set so far, so they are indistinguishable in the Telegram notifications. |
Hello,
I'm trying to use backup.ps1, but it is freezing. Apparently it can't move the log folder to the recycle bin. This is my last log file:
`2020-05-13 04:01:28.066 Folder does not exist. It has just been created
2020-05-13 04:01:28.140
2020-05-13 04:01:28.146
2020-05-13 04:01:28.152 =================================================================
2020-05-13 04:01:28.157 ==== Starting Duplicacy Backup @ D:\Tools\Duplicacy
2020-05-13 04:01:28.172 ====
2020-05-13 04:01:28.178 ==== Start time is: 2020-05-13 04:01:28
2020-05-13 04:01:28.183 =================================================================
2020-05-13 04:01:28.188 === doRemoteNotifications
2020-05-13 04:01:28.195 === doTelegramNotification
StatusCode : 200
StatusDescription : OK
Content : {}
2020-05-13 04:01:31.166 Zipping (and then deleting) the folder: D:\Tools\Duplicacy.duplicacy\tbp-logs\2020-05-11 segunda-feira to the zipFile: D:\Tools\Duplicacy.duplicacy\tbp-logs\2020-05-11 segunda-feira.zip
2020-05-13 04:01:34.839 OS is Windows => sending file to Recycle Bin`
The text was updated successfully, but these errors were encountered: