Results 1 to 4 of 4
Thread: Updating a tar.gz file
|
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
01-16-2003 #1Just Joined!
- Join Date
- Jan 2003
- Location
- Evansville
- Posts
- 2
Updating a tar.gz file
I set up a server and I have a backup partition on it. I would like to schedule jobs that backs up the entire contents of a folder into the spefic days tar.gz file.
For example, every monday, all of the contents will be backed up and gzipped into monday.tar.gz
Every tuesday, all of the contents will be backed up and gzipped into tuesday.tar.gz
However, I have not found a method that updates a COMPRESSED tar file. When I use the -u flag to update the tar file, it says that it cant update a zipped tar file.
Right now, I just have the setup working using tar with no compression but I would love for the compressed files to be updateable.
-
01-16-2003 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
There's no way to update tar files while they are gzipped, for two reasons:
1. You can't seek in the compressed data.
2. You can't update, since that would affect all later data in the compressed stream.
Of course, both these are _possible_ to fix, but seeking would require walking through the compressed stream from the beginning to the target position, and modifying would require walking through it from the update position to the end, so in effect you are practically unzipping and rezipping it all during the operation.
Can't you just unzip the file while you're updating it, and then rezip it when done?
-
01-16-2003 #3Just Joined!
- Join Date
- Jan 2003
- Location
- Evansville
- Posts
- 2
scheduled update
well, I would like to have this process automated. So using Webmin, I just have the series of tar commands scheduled for each day of the week.
-
01-16-2003 #4Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
It's very possible to automate it. I can't say that I know what webmin is, but it sounds like it's possible to issue shell commands, right? If so, just issue "gunzip day.tar.gz; tar <options>; gzip day.tar.gz". (As you can see, it's basically just pseudocode, modify it to your config)
If it's not possible using this webmin thing, log in to a shell and use the crontab instead.


Reply With Quote