Creating Empty Directories

I have a postgresql backup job set up as follows:-

  • connects to the database - no issues
  • Select database - no issues correct database is backed up
  • Store backups in selected destinations : i.e ftp server :courses\Sql backups\ - no issue backup gets stored
  • Schedule backups - no issues runs with no issues
  • Send confirmation - email alerts are sent
  • Temp folder - left blank as databases are small
  • run custom scripts - not on
  • backup folders - not on
  • compress backups - not on

The ftp account used connects to the server and selects the database and stores it in the correct place.

My issue is that a directory is getting created on the :\users<windows user> (account used<then creates directory of user again>, but the directories are empty. I need to stop this, but how ???

And the backup has been saved already in the corrected selected destinations.

Basically a directory of the user is being created again in the stored location with the path of the stored destintations but is empty. i.e:
\Users\phil\phil\db<database name>

anything in phil\phil is empty folders.

Hope this makes sense…

Hope someone can help… Will to send a small donation to a charity of your choice for first one with working solution.

bumping and hoping for a reply.

Hello Philip_Saunders,

Could you please clarify who creates the empty directory, SQLBackupAndFTP?

Please note that the application creates a structure of temporary directories for its operation, some of which may be empty. You can set the path to the temporary directories in the corresponding section of the application.

If you have any other questions, please let us know.

Thank you and sorry for the inconvenience.

Thanks for the quick reply. The databases are really small so no temp folder set.
When the backup see screenshot runs it creates the empty folder.

If it has to create the empty directories what is the best way to delete them once the backup has finished and been verified.

As you can see the backups are running and saving where they should be… Note only one phil directory.

Hello Philip_Saunders,

Thank you for your reply and for the details.

We apologize for any inconvenience, but please note that SQLBackupAndFTP will always use a temporary folder, even if you do not specify one. Unfortunately, this feature cannot be disabled, as it is an inherent part of the application’s functionality.

Please let us know if you have any other questions.

Thank you.

I’ve created a batch job that I run now when it finishes the backup.

@echo off

set “target=%1”

if “%target%”=="" (
echo Usage: %0 directory
exit /b 1

if not exist “%target%” (
echo Directory does not exist: %target%
exit /b 1

for /f “delims=” %%d in (‘dir /s /b /ad “%target%” ^| sort /r’) do (
rd “%%d” 2>nul

exit /b 0

Hello Philip_Saunders,

Good news! Thank you for the update.