February 2, 20206 yr Hi, I've setup rsync to run every 3 days and copy files that are important, files that have been removed or changed are automatically moved on the backup server to /mnt/disk5/Deleted by using the "-backup-dir" switch in the rsync command. Now my /mnt/disk5/Deleted on the backup server is filling up and i need to make another script to clean this up. I was thinking of simply going by a simple "older than x days script" but i realize now that it may not work as i want it to because file creation time is not when they are copied to the deleted folder, it is rather when they are created on the backup server the first time. Running a script like: Quote find /mnt/disk5/Deleted/ -mindepth 1 -mtime +60 -delete Should delete all files older than 60 days but like i said many files may be older than 60 days when they first appear in the /mnt/disk5/Deleted/ so the effects may be grim wiping the entire /mnt/disk5/Deleted/ folder entirely. How would you best go about cleaning up this folder? The reason i ask is because i ran some trials in the folder before actually running it as this: Quote find /mnt/disk5/Deleted/ -mindepth 1 -mtime +1000 -depth -print and even running the command at 1000 days it still finds files in the path it wants to delete, i started using unraid backup server 2 months ago so there should be no files found running it at 1000 days. Any ideas? Edited February 2, 20206 yr by je82
February 2, 20206 yr Author well that was easy, i realize there are ctime and atime as well in unix, never mind
Archived
This topic is now archived and is closed to further replies.