Skip to content
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

Closed
menedj opened this issue Apr 26, 2022 · 8 comments
Closed

copy instead of overwrite #72

menedj opened this issue Apr 26, 2022 · 8 comments

Comments

@menedj
Copy link

menedj commented Apr 26, 2022

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)

@HoffmannTom
Copy link
Owner

Hello,
the download is at https://github.com/HoffmannTom/outlookbackupaddin/releases/tag/1.10
It's contained in the zip-package.
Open the OutlookBackupAddIn.zip and check the folder "sample-scripts".

Greetings, Thomas

@menedj
Copy link
Author

menedj commented Apr 27, 2022

Hi Thomas,
Thank you for the link! I modified the backup from REGEDIT so that the OST files are compressed and so far so good.
I inserted keep_n_backups.bat among the commands to be executed post backup: it correctly renames the files compressed by account@provider.com.GZ to account@provider.com_0.bak
At the end, however, the window does NOT close but it gives me this message, and I have to manually close the window. What am I doing wrong?


11:27:48 Starting post-backup cmd: C:\Backup_Outlook\OST-PST\keep_n_backups.bat
11:27:48
11:27:48
11:27:48 One or more errors occurred. Please check the messages above and close this window manually.

@HoffmannTom
Copy link
Owner

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

@menedj
Copy link
Author

menedj commented Apr 27, 2022 via email

@HoffmannTom
Copy link
Owner

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

@HoffmannTom
Copy link
Owner

Hello,
I will close this issue within the next 7 days if no further information is provided.
Greetings, Thomas

@menedj
Copy link
Author

menedj commented Oct 11, 2022 via email

@HoffmannTom
Copy link
Owner

Hello!
How large is your outlook file?
It looks like an integer overflow
Greetings, Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants