Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I have one directory that has many subdirectory and total size is about 11G.The files in that directory is various every day(created or deleted). Now I want to backup this directory once a day and want to keep the files permission and owner unchanged (becuase I want to restore it in the future). Because the total files size is very large(11G) and it will spend a long time if backup the whole directory every time, I just want to backup the changed files(created or deleted) except for the first backup.I have used the following methods and have some troubles:
1. cpio or tar : can not deal with so large files( they have a limitation 2G or 4G?).
2.cp -a (thanks for Cheers help): It can deal with large files and the option -a can keep the files permission and owner unchanged , but It have to copy the whole directory every time.
I have used the cp -aU , It can backup the newly created files only(the unchanged old files do not backup), but it can not delete the old files in the backuped directory while the coresponding files in the original directory was deleted .
The 2.1 Gb is a file size limit. You just can't make a file grow bigger than 2.1 Gb with a standard kernel.
You will have to compile a kernel with support for large files if you want to exceed this limit.
i dont know how useful it will be but im thinking you could write a makefile, make executes commands based on whether files are older than there dependancies so could you put cp and rm commands in a makefile?