Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have an incremental backup script for my linux box. I used "find -mtime 1" to find all of files accessed on today. But the result is huge. If a file name is changed, the directory is returned. So the whole directory is backed up. At the end, the size is too big for me to backup everyday.
So I modified a little to "find -mtime 1 -type f". The return is much smaller since it only return the files changed on today. But it bring me another problem. If I changed a directory's name like "mv dir1 dir2", nothing will be backup because no file is changed. It will cause my problem when I resotre it in the emergency case.
Anyone could give me some hint to accomplish these two goals together?
Not to say there's not a way to fix your script, I have no idea. But have you looked into partimage? It's a linux backup utility that does incremental backups. I haven't personally used it but I was looking into it and I think it might suit your needs nicely.
After I run "find / -mtime -1 /! -type d ", I will get the all files that changed in 24 hours. It does not solve my problem. My problem is that if a directory only changed name by "mv", the super-directory's last modified time is changed and so the whoe super-directory is backed up. I do not want to waste space. (I only want to backup the directory with the new name.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.