Question Locked

backing up directories with active process's running in unix

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Ok, I know this is a stupid question(least in my eyes). I have just set up a UNIX box(FreeBSD 6.2), and building the backup process's. The directories that I want to back up are /home /etc /namedb and /apache22.

As you can tell, most of these directories will have active process's including the home directories. When I tried using tar -cfvz, I get the following error message;tar: /usr/local/backups/apache22/apache22-daily-20070213.tgz: Cannot stat: No such file or directory.

This error message is being driven out of a perl script that performs the tar function via a system call. When I try to perform the same tar function from command line, I also receive the same error. This is all occurring from root account, so no permission issues should be occurring.

What I have read on that specific error message states that there is an active process running, and this is most likely causing the error. Yea, ok... Works for me, I know there are active process's running in all of those directories.

Suggestions here on how I can back up these directories??? It is a remote machine where I will be ftping/sftp the backup files off site for safe keeping after the backup is complete.

god, Im stupid. This is going to be a chit day.

Dan

4 replies

by danlm

screw it, I'll copy the directories to a work area and back them up from the work area. That way there will be no active process's.

Just command lined that to test, and that works.

What a pain.

Dan

by marv732

should be

tar -cvfz tarfilename dir/filename .....

by danlm

both in the Perl code and also the command line I keyed, the syntax of tar command was as you showed.

I have added a copy of the directories I wanted backed up to a workdir(actually called it that), and then used the same backup script except pointing to the workdir. It works now.

So, I would say the various topics I found on Google for that error message are correct. Because active process's were running in the various directories I was trying to tar. It would not execute properly.

My major concern was getting backups done, thankfully I have accomplished that in a scheduled manner.

Thanks marv732.

Dan

This discussion is closed to new replies.