Video Screencast Help

Backup & delete

Created: 02 Jul 2013 • Updated: 05 Jul 2013 | 9 comments
This issue has been solved. See solution.

Hello all!!!

При выполнении бэкапа удалятся каталог и содержимое в нем,мне нужно чтобы удалялось все в нем но не сам каталог

When the backup directory and deleted the contents in it,
I need to be deleted everything in it but not the directory

Operating Systems:

Comments 9 CommentsJump to latest comment

Jaydeep S's picture

Are you talking about archiving (backup) or restore.

EvgeniyL's picture

Yes i talk about archiving (Backup  Job Properties -> General -> Backup method -> full - Back up & delete the files)  

Sush...'s picture

Hello there,
  If you want to delete all the contents of the Directory then you need to select it from the Root.

Eg.: If you want to delete folder Test2 and Test1 and your directory structure is E:\MS\Test1 and E:\MS\Test2 then you need to select the root of these folders which is MS folder.

Thanks,
-Sush...

Hope this piece of Information Helps you... and if it does then mark this response as Solution....!!!

EvgeniyL's picture

When i select root directory then removed root directory with contents

 

Eg.: D:\Backup\1.txt after backup D:\Backup\ ---- file 1.txt backup & delete

b&d.JPG

 

b&d1.JPG

Sush...'s picture

Hello there,
   I am not sure why you are using Include/Exclude option here. As you are using the Archiving option, when you select the Root of any directly... after backups are completed everything under that directory will be deleleted.

Thanks,
-Sush...

Hope this piece of Information Helps you... and if it does then mark this response as Solution....!!!

EvgeniyL's picture

Eg.: I have D:\Backup\0.txt, D:\Backup\1\1.txt, D:\Backup\2\2.txt after backup& delete  i have

                D:\Backup\, D:\Backup\1\, D:\Backup\2\

but me need to get only D:\Backup\

My Option

b&d3.JPG

If uncheck "Preverse tree on back up  and delete" i get after run job  only D:\

Sush...'s picture

Hello Evgeniyl,
    Ok, I tested this scenario and found that if we select 'Backup' folder and also uncheck the "Preserve tree on backup and delete' option then after the backup and deletion happens what remains is just D:\ drive.

I think this is by design so may not be of much help. But I have tested one workaround which will help you to achieve D:\Backup folder after backup and delete.

Just create a dummy file called 'dummy.txt' inside the 'D:\Backup\dummy.txt'. Now during selecting the data select the complete 'Backup' folder and then just uncheck the dummy.txt file. Also uncheck the 'Preserve tree' option.

Now run the job and you will observe that all the data under the 'Backup' folder is archived and only dummy.txt file is remaining which will also help to keep the D:\Backup folder.

The only dis-advantage with this workaround is that when you add new files & folders to the 'Backup' folder you will have to manually select them in the selection list.

Thanks,
-Sush...

Hope this piece of Information Helps you... and if it does then mark this response as Solution....!!!

SOLUTION
EvgeniyL's picture

Thanks Sush.... This could be considered solution, but I do not want create unnecessary file.

can have a universal solution or this bag SBE2010R3 ???

Sush...'s picture

Hello there,

    Other than this I do not see any universal solution for this.

 

Thanks,

-Sush...

Hope this piece of Information Helps you... and if it does then mark this response as Solution....!!!