Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 was running a tar command on a folder with around 150GB of files. It is a website script and a picture galleries site. The exact command was:
tar -zcf target-file-name.tar.gz /home/www/html/site-folder
I was reading about this error on the Internet and I have a general idea what it is, but I was wondering about two things:
1) What is it that is changing these files or a file? What is it literally on a Centos 7 machine that is doing that? It is a basic installation with httpd, mariadb, php and other things like this that are needed for the serving of sites.
chattr +i /path/to/file (makes the file write immutable)
Also maybe this might help: lsof -p pid# | grep log (to see what logs something is writing to; replace log with bin to see where the binary is, or .so to see what shared library something is using)
Last edited by justmy2cents; 06-05-2017 at 03:26 PM.
Have you searched through the source folder for all those files modified since you started the tar running? That should help you take the first step and pinpoint which file(s) are being modified, if any. Also check ctime and atime's.
I trust that you're not creating the target archive in the source folder.
I was running a tar command on a folder with around 150GB of files. It is a website script and a picture galleries site. The exact command was:
tar -zcf target-file-name.tar.gz /home/www/html/site-folder
I was reading about this error on the Internet and I have a general idea what it is, but I was wondering about two things:
1) What is it that is changing these files or a file? What is it literally on a Centos 7 machine that is doing that? It is a basic installation with httpd, mariadb, php and other things like this that are needed for the serving of sites.
2) How can I stop that.
Find what it is and stop it... How to do that?
Thanks.
You are in /home/www/html/site-folder/ when you ran it.
Have you searched through the source folder for all those files modified since you started the tar running? That should help you take the first step and pinpoint which file(s) are being modified, if any. Also check ctime and atime's.
I trust that you're not creating the target archive in the source folder.
No, I was not doing that. I was one directory above that. I actually used the tar command on Windows Cygwin and it worked. I dont have to rsync that data too and my connection speed is not very good (I have a lower plan).
If it's a live website, it's probably the active log files that are changing. You can put them in an exclusion file so they are not backed up by tar (you probably don't need them backed up anyway). You can leave archived log files being backed up since they no longer changing, if you have some log rotation script installed (just make sure the rotation doesn't conflict with your backup).
Forums and other stuff is usually saved to a database which should store its files somewhere else and should have its own backup tools.
If it's a live website, it's probably the active log files that are changing. You can put them in an exclusion file so they are not backed up by tar (you probably don't need them backed up anyway). You can leave archived log files being backed up since they no longer changing, if you have some log rotation script installed (just make sure the rotation doesn't conflict with your backup).
Forums and other stuff is usually saved to a database which should store its files somewhere else and should have its own backup tools.
Thanks for the info. I will be looking into all that later on. As far as that, the site was not live. If it would be live, there are in fact some folders there that constantly change, like caching.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.