-
Notifications
You must be signed in to change notification settings - Fork 27
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
copy instead of overwrite #72
Comments
Hello, Greetings, Thomas |
Hi Thomas, 11:27:48 Starting post-backup cmd: C:\Backup_Outlook\OST-PST\keep_n_backups.bat
|
Hello, For testing purposes you can try "exit /b 0" at the end of the script to override a possible error. Greetings, Thomas |
Hello,
I made the change you suggested, but the error still appears (which I report below) and I have to manually close the window.
is it possible to copy the file inside a subfolder?
Best regards
TotalFileBytesTransferred:-2147483648
FileSize:3035701248
16:16:39 Starting post-backup cmd: C:\Backup_Outlook\OST-PST\keep_n_backups.bat
16:16:39
16:16:39
16:16:39 One or more errors occurred. Please check the messages above and close this window manually.
@echo off
setlocal enableextensions enabledelayedexpansion
rem set max no of backups to keep and backup folder
set MAX_BACKUP=1
cd C:\Backup_Outlook\OST-PST
rem set default revision no to 0
set rev=0
rem read last revision no if exists
if exist revision.txt (
for /f "delims=" %%a in (revision.txt) do (
set rev=%%a
)
)
rem calculate next revision no
Set /A rev=!rev!+1
Set /A rev=!rev! %% !MAX_BACKUP!
rem find pst- and osts-files and rename them
FOR /F "delims=" %%I IN ('DIR *.pst *.ost *.gz /B') DO (
set x=%%I
if exist "!x:~0,-4!_!rev!.bak" del "!x:~0,-4!_!rev!.bak"
ren "!x!" "!x:~0,-4!_!rev!.bak"
)
rem save current revision no
echo !rev! > revision.txt
endlocal
exit /b 0
Da: HoffmannTom ***@***.***>
Inviato: mercoledì 27 aprile 2022 15:58
A: HoffmannTom/outlookbackupaddin ***@***.***>
Cc: menedj ***@***.***>; Author ***@***.***>
Oggetto: Re: [HoffmannTom/outlookbackupaddin] copy instead of overwrite (Issue #72)
Hello,
it looks like the script has an exit-value not equal to 0.
If the script returns something > 0, then it is considered as an error.
For testing purposes you can try "exit /b 0" at the end of the script to override a possible error.
Fixing the error or warning in the script is preferred (if that's the reason).
Greetings, Thomas
—
Reply to this email directly, view it on GitHub <#72 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AY4WQ3HJTFDHEKCEPI2LAGTVHFBXBANCNFSM5ULHPYOA> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AY4WQ3BMNPOJMLSZU5Q524DVHFBXBA5CNFSM5ULHPYOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOII4RJ6Q.gif> Message ID: ***@***.***>
|
Hello, The window stays open, whenever a warning or error is shown. Greetings, Thomas |
Hello, |
hi,
here it is!
16:37:56 Starting backup in 3 seconds
16:37:57 Starting backup in 2 seconds
16:37:58 Starting backup in 1 second
16:37:59 Starting backup...please wait...
16:37:59 Check whether outlooks is still running ...
16:37:59 No outlook process found
16:37:59 Ensure only one instance running ...
16:37:59 Check whether target directory exists...
16:37:59 Summing up file sizes ...
16:37:59 Adding size of C:\Users\*****\AppData\Local\Microsoft\Outlook\*****@*****.com.ost
16:37:59 Total bytes calculated...
16:37:59 Evaluate destination path...
16:37:59 copy C:\Users\*****\AppData\Local\Microsoft\Outlook\*****@*****.ost to C:\OUTLOOK_BACKUP\OST-PST\BACKUP_*****@*****.com.ost.gz
16:37:59 Getting file lock...
16:39:12 Failed to copy file: Error in reporting progress
TotalFileBytesTransferred:-2147483648
FileSize:3836289024
16:39:12 One or more errors occurred. Please check the messages above and close this window manually.
Da: HoffmannTom ***@***.***>
Inviato: mercoledì 27 aprile 2022 16:49
A: HoffmannTom/outlookbackupaddin ***@***.***>
Cc: menedj ***@***.***>; Author ***@***.***>
Oggetto: Re: [HoffmannTom/outlookbackupaddin] copy instead of overwrite (Issue #72)
Hello,
you can add a move after the ren(ame) in the FOR-loop.
But you must also adjust the delete and if-exists a line above.
Not tested, just by viewing the code. Maybe you need to do further adjustments.
You are free to modify the script according to your needs.
No guarantee from my side ;)
The window stays open, whenever a warning or error is shown.
Your snipped is just the last part. Maybe you can take a look above, if something happened.
Or you can post the whole (anonymized) content of the window.
Greetings, Thomas
—
Reply to this email directly, view it on GitHub <#72 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AY4WQ3DE53WQHXFQB7F2PGDVHFHV3ANCNFSM5ULHPYOA> .
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hello! |
Hello,
thanks for this great App! In the support I have been looking for a solution to my problem but I cannot find where to download "keep_n_backups.bat".
In any case, I would like to have 2 backups inside the folder and the oldest backup to be overwritten so that I can alternate them if necessary. How can I do?
Hello,
please take a look at the sample-scripts provided in the installation folder.
The script "keep_n_backups.bat" should do the work for you.
Just configure the add-in to run this script after backup.
Greetings, Thomas
Originally posted by @thomass4t in #62 (comment)
The text was updated successfully, but these errors were encountered: