Diff. Backup Script Using TAR. Should be simple.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Diff. Backup Script Using TAR. Should be simple.
# 1  
Old 01-29-2008
Java Diff. Backup Script Using TAR. Should be simple.

I'm specifically trying to find help or insight on using the --incremental ('-G') option for creating a tar. Please resist the urge to tell me to use --listed-incremental ('-g') option. That's fairly well documented in the GNU tar manual. GNU tar 1.19

This is what the manual does say in section 5.2:
Quote:
The option ‘--incremental' (‘-G') .... When used with ‘--create' option, it creates an incremental archive without creating snapshot file. Thus, it is impossible to create several levels of incremental backups with ‘--incremental' option.
What I'm trying to do is write a small backup script that will create one tar file that contains all the changes since a level 0 tar dump of the directory I'm backing up. That way, I save time and resources only backing up new changes. Since I have no interest in creating multiple levels of incremental backups, it seems like the --incremental (-G) option is better suited to my task. And it would be nice not to have to hassle with a snapshot file if it's unnecessary.

Also, it appears that using the -N option isn't recommended for incremental/differential backups. From section 6.8 Operating Only on New Files:
Quote:
Please Note: ‘--after-date' and ‘--newer-mtime' should not be used for incremental backups. See section Using tar to Perform Incremental Dumps, for proper way of creating incremental backups.
Help is much appreciated.
Gabe
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Simple directory tree diff script

I have had some issues with a data drive and have copied all of the data to a new drive. The size used is not the same on both drives with a 3GB difference (less on the new drive). There are millions of files on the data drive, so it is not an easy task to determine if there are some files missing... (17 Replies)
Discussion started by: LMHmedchem
17 Replies

2. Homework & Coursework Questions

Create a simple bash backup script of a file

This is the problem: Write a script that will make a backup of a file giving it a ‘.bak’ extension & verify that it works. I have tried a number of different scripts that haven't worked and I haven't seen anything really concise and to the point via google. For brevity's sake this is one of the... (4 Replies)
Discussion started by: demet8
4 Replies

3. Shell Programming and Scripting

Backup script to split and tar files

Hi Guys, I'm very new to bash scripting. Please help me on this. I'm in need of a backup script which does the ff. 1. If a file is larger than 5GB. split it and tar the file. 2. Weekly backup file to amazon s3 using s3rsync 3. If a file is unchanged it doesn't need to copy to amazon s3 ... (4 Replies)
Discussion started by: ganitolngyundre
4 Replies

4. Homework & Coursework Questions

A simple Backup script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: All I have to do is write a script that will take two arguments. The first argument is a list which will contain... (1 Reply)
Discussion started by: Waffles
1 Replies

5. Shell Programming and Scripting

Not correct processing of “\ “ in names of dirs inside shell script (tar command - system backup scr

Hello, Recently, I've started with shell scripting, and decided to write a script for my system backup using tar. When I was dealing with tar execution inside shell script I found this, inside shell we have the following code: tar $TAR_PARAMS $ARCHIVE_FILE $EXCLUDE $BACKUP_STARTwith... (6 Replies)
Discussion started by: ilnar
6 Replies

6. Shell Programming and Scripting

How to create a simple shell script to backup

Hello - I am in process of deleting many files which are older than 4 weeks. For example I am inside: /subsystem/prod/ Files are with various extentions, but anything older than 4 weeks should be deleted. What would be the most simplest script to acheive this? (4 Replies)
Discussion started by: DallasT
4 Replies

7. Shell Programming and Scripting

lvm/tar/rsync backup script feedback/criticism

I have written a shell script to perform backups using tar, rsync and optionally utilise lvm snapshots. The script is not finished but is in a working state and comments/descriptions are poor. I would greatly appreciate any criticism and suggestions of the script to help improve my own learning... (0 Replies)
Discussion started by: jelloir
0 Replies

8. Shell Programming and Scripting

Problem with tar in a backup script

I had an idea of very-very easy bacup script that packs ALL of the files in current dir (including the subfulders and with spaces in name), packs them with tar+gz and moves to a directory. I'm using Cywin under WinXP. But I have a problem with tar. When I do in a single line "tar -rf... (2 Replies)
Discussion started by: TennageWerewolf
2 Replies

9. Shell Programming and Scripting

[bash] Simple backup (cp) script but incremental

Hi all, I would need a rather simple bash backup script that loops throught the (local) users and for each users backs up (cp!) its /home/username folder. About the functionalities: The script has to run every 2 hours (that's cron, so don't mind about that) and the files should be copied to... (12 Replies)
Discussion started by: laurens
12 Replies

10. UNIX for Dummies Questions & Answers

diff on compressed files with tar.gz ext

how can I find out what is the difference between two tar.gz files without uncompressing them. thank you. (7 Replies)
Discussion started by: rakeshou
7 Replies
Login or Register to Ask a Question