Hi All,
Every day, when we take a MongoDB backup, it creates new folders with the current date marked in them.
Is it possible to remove the folders from our path that are seven days old? making use of a unique workflow only; if one exists, kindly share it. Numerous files and subfolders are also contained in the folders.
Need assistance. Urgent.
@RE5260 you can remove existing folders from the current folder and take MongoDB backup.
Yes we can manually delete the older folders. I wanted to know if this can be automated or not. A custom workflow which runs on a bi-weekly basis which will delete the older folder from a path. If you know please assist.
Could you use the data diectory tool and filter for those that are created in the last 2 weeks(or what ever time period is approirate) and then import that using the dynamic input tool?
You can identify what folders you want deleted, formulate the corresponding delete command in the workflow, and pass that command to the Run Command tool.
I'm not sure of your operating environment, but I was able to accomplish this by dynamically generating a batch file (use the Output Tool to create a CSV file but save it with the .bat extension) that would delete the target files/folders, and then have the Run Command tool execute that batch file.