Hello, I have two seperate directories I wish to backup on the linux system /home and /usr. I don't seem to be able to find a way to enter the correct path in the crontab so I decided to create a script which takes the contents of /home and inputs it into a file, then append the file with the input of the /usr directory. What I now need to know is how can I get the cpio command to acknowledge this log file and backup all the filenames entered in there??? Somebody please help. Cheers Damian Buckley
Damian Buckley wrote:
Hello, I have two seperate directories I wish to backup on the linux system /home and /usr. I don't seem to be able to find a way to enter the correct path in the crontab so I decided to create a script which takes the contents of /home and inputs it into a file, then append the file with the input of the /usr directory. What I now need to know is how can I get the cpio command to acknowledge this log file and backup all the filenames entered in there???
Somebody please help.
I think what you mean is that you want to backup these two dir's from cron? If not... sorry for the interruption =) But: find /home /usr | cpio -ocvO /output_file.cpio will do the trick for your command, then just mold that into your crontab.. no need to make files and append stuff.. -Jim
On Wed, 2003-10-01 at 10:40, Damian Buckley wrote:
Hello, I have two seperate directories I wish to backup on the linux system /home and /usr. I don't seem to be able to find a way to enter the correct path in the crontab so I decided to create a script which takes the contents of /home and inputs it into a file, then append the file with the input of the /usr directory. What I now need to know is how can I get the cpio command to acknowledge this log file and backup all the filenames entered in there???
Somebody please help.
Cheers
Damian Buckley
Why not just use tar? Something like the following... tar cf /somefile/somewhere /home /usr > logfile This can also be used in a crontab . -- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998
participants (3)
-
Damian Buckley
-
Jim Bonnet
-
Ken Schneider