by Gabriel Vasilescu.
Problem solved.
One of my collegues created a script that will remove all automated backup files.
The process is:
1. cd to /moodledata/filedir
2. clear/remove the old output.sh file form that directory as we are generating new one.
3. Run this to generate new output.sh: mysql -u root -p moodledb < $HOME/script.sql> output.sh
4. vi the output.sh file and delete the first top row (we don’t need that) starting with: concat("rm -rf ",subs…
5. Make it executable: chmod +x output.sh
6. Run the clearing process with: ./output.sh
The script called script.sql
select concat("rm -rf ",substr(contenthash,1,2),"/",substr(contenthash,3,2),"/",contenthash) from mdl_files where component="backup" and filearea="automated";
I hope this will help others too.
I managed to reclaim 80Gb of space in less than 5 min
One of my collegues created a script that will remove all automated backup files.
The process is:
1. cd to /moodledata/filedir
2. clear/remove the old output.sh file form that directory as we are generating new one.
3. Run this to generate new output.sh: mysql -u root -p moodledb < $HOME/script.sql> output.sh
4. vi the output.sh file and delete the first top row (we don’t need that) starting with: concat("rm -rf ",subs…
5. Make it executable: chmod +x output.sh
6. Run the clearing process with: ./output.sh
The script called script.sql
select concat("rm -rf ",substr(contenthash,1,2),"/",substr(contenthash,3,2),"/",contenthash) from mdl_files where component="backup" and filearea="automated";
I hope this will help others too.
I managed to reclaim 80Gb of space in less than 5 min