we have log files generating from different sources and storing in directories & sub-directories. The directory structure is something like below.
I want to tar & zip the file older than 30 days maintaining the directory structure and delete the archived files after the tar & zip.
Can someone help me with this? How this can be achieved.
dataload
├── apiConnectorApp
│ ├── csv
│ │ ├── 20210216231308
│ │ ├── batch1
│ │ ├── batch2
│ │ └── batch3
│ ├── day1Load
│ ├── logs
│ └── sql
├── configs
│ ├── eSite
│ │ ├── CKB2B
│ │ │ ├── CatalogEntryAssociations
│ │ │ ├── CatalogGroup
│ │ │ └── CatalogGroupCatalogEntryRelation
│ │ └── THB2B
│ │ ├── CatalogEntryAssociations
│ │ ├── CatalogGroup
│ │ └── CatalogGroupCatalogEntryRelation