- Registriert
- 30. März 2022
- Beiträge
- 1.211
- Reaktionspunkte
- 2.163
- Punkte
- 229
Ahh Scheiße!?!? I just made a rookie mistake and deleted all the files in /root
I wanted the script to print "Deleting <filename>" when deleting an old docker export and mistakenly added:
instead of:
resulting in:
I've restored the following by copying them from another Synology:
I wanted the script to print "Deleting <filename>" when deleting an old docker export and mistakenly added:
Code:
find . -type f -exec sh -c 'echo "Deleting $(basename "{}")"; rm "{}"' \;
instead of:
Code:
find "$ExportDir" -name "${container}_*.json" -mtime +"$DeleteOlder" -exec sh -c 'echo "Deleting $(basename "{}")"; rm "{}"' \;
resulting in:
Code:
root@DISKSTATION:~# /volume1/scripts/syno_docker_export.sh
Synology_Docker_Export v1.0.2
DS1821+ DSM 7.3.1-86003
Exporting container settings to /volume1/docker/docker_exports
Exporting portainer json
Deleting .wget-hsts
Deleting history
Deleting .profile.size_check
Deleting Tree
Deleting .profile
Deleting FOR SYSTEM USE ONLY. DO NOT UPLOAD FILES HERE.
Deleting dead.letter
Deleting ini
Deleting known_hosts
Deleting 2025-11-24T22_42_51_983Z-debug-0.log
Deleting 2025-11-29T02_45_40_714Z-debug-0.log
Deleting 2025-10-28T06_36_21_655Z-debug-0.log
Deleting 2026-01-31T01_48_16_930Z-debug-0.log
Deleting 2025-11-29T02_45_36_616Z-debug-0.log
Deleting 2025-10-28T06_24_00_468Z-debug-0.log
Deleting 2026-01-31T01_48_12_536Z-debug-0.log
Deleting 2026-02-02T22_03_17_047Z-debug-0.log
Deleting 2025-11-24T22_42_55_019Z-debug-0.log
Deleting 2025-10-28T06_36_25_235Z-debug-0.log
Deleting 2025-10-28T06_23_56_552Z-debug-0.log
Deleting _update-notifier-last-checked
Deleting .lesshst
Exporting jlesage-dupeguru1 json
Exporting organizr-organizr1 json
Exporting linuxserver-librespeed1 json
Exporting scrutiny json
Exporting iPerf3 json
Exporting pannal-kitana1 json
Exporting shell-ui json
Exporting Red5d_docker-autocompose json
Exporting cglatot-pasta1 json
Finished
I've restored the following by copying them from another Synology:
Code:
.profile
.profile.size_check
.wget-hsts
"FOR SYSTEM USE ONLY. DO NOT UPLOAD FILES HERE"

I like you
