Sponsored Content
Full Discussion: incremental backup
Top Forums UNIX for Dummies Questions & Answers incremental backup Post 302297869 by ruben.rodrigues on Monday 16th of March 2009 03:46:16 AM
Old 03-16-2009
Quote:
Originally Posted by Usha Shastri
Hi All..

i am trying to write a script which will give the incremental tar backup of all files with latest timestam.

i tried with find -mmin -2
but if it takes half on hour or something to creat the tar itself, then no meaning in using the above command.
so please help me to find the solution

Thank u
Try this Automating backups with tar
Is very cool and works nice
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to reinvent incremental backup in bash?

I want to backup two important files everytime they are modified. How would I write a bash script that would check the dates of my zip files and my data files and only create a new zip file if the zip file is older than the two data files? Thanks, Siegfried (1 Reply)
Discussion started by: siegfried
1 Replies

2. Shell Programming and Scripting

tar - incremental backup

Hello everyone! I'm trying to make incremental tar archives of a folder for an example. On the box I use is UNIX AIX installed. I tried some sample codes I found on several web pages but with no success. Don't know what I'm doing wrong. Please write some sample code to make incremental tar... (0 Replies)
Discussion started by: Funky_ass
0 Replies

3. UNIX for Dummies Questions & Answers

Best unix incremental backup utility?

Hello everyone. Could you please advise of what would be the best Unix (Debian 4) program for regular (daily or weekly) incremental backups? I'm not sure whether the backups will be stored on a "backup" drive on the same system or on an external "backup" system, but we would like to have a... (2 Replies)
Discussion started by: nottrobin
2 Replies

4. 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

5. Shell Programming and Scripting

Incremental backup

Hi, I would like to create a daily incremental backup of a directory with all of the files within and add a timestamp (year-month-day) to the tar.gz file. I have the following, but it doesn't backup the inside files of the directory. #!/bin/bash tar -czf... (1 Reply)
Discussion started by: agasamapetilon
1 Replies

6. Windows & DOS: Issues & Discussions

Incremental Backup

I have a folder /root/test in a centos 5.3 system. I want to take an incremental backup of the contents of the folder in the C:\Downloads folder of a windows system present in the same lan as the linux system. What are the ways of executing this plan? Kindly help (0 Replies)
Discussion started by: proactiveaditya
0 Replies

7. UNIX for Advanced & Expert Users

Do incremental backup without tar files up

I'm trying to do a incremental backup for a big NFS. Since space is not an issue, I don't want to compress them or end up with a big tarball for full backup( and a series of small tarballs for incremental backup). Basically I want the TAR backup/restore functionality but not TAR files up.... (3 Replies)
Discussion started by: overmindxp
3 Replies

8. UNIX for Dummies Questions & Answers

incremental and full backup.. please help me

Hi, i'm new here(and a newbie) and i need some help with a project. I need to write a script for an incremental backup (this must be executed every day at 24:00) and a full backup (executed once a month) for etc/var/home directories. Can someone please help me with this? And a small explanation of... (9 Replies)
Discussion started by: bender-alex
9 Replies

9. Homework & Coursework Questions

incremental or full backup ???

Hi. Can someone tell me if the following script that i have made is a script for INCREMENTAL BACKUP or FULL BACKUP. My teacher told me that is doing an FULL BACKUP. • find /etc /var /home -newer /backups/.backup_reference > /backups/.files_to_archive • touch /backups/.backup_reference • tar... (1 Reply)
Discussion started by: bender-alex
1 Replies

10. Shell Programming and Scripting

Incremental Backup using tar for more than one path

Hi everyone; I need to create a shell script for full and incremental backup purposes. for incremental backup only for one folder (test1) located in /home/test1 syntax below works fine and have no problem: tar -cvf /home/backup/backup-0.tar.gz -g /home/test1/test.snar /home/test Problem is here... (5 Replies)
Discussion started by: momed131
5 Replies
hdup(1) 						      General Commands Manual							   hdup(1)

NAME
hdup - harddisk duplicator/harddisk backupper - backup to harddisk SYNOPSIS
hdup [ OPTION ] SCHEME HOST [ @USER@REMOTEHOST ] (1st format) hdup [ OPTION ] restore HOST DATE DIRECTORY [ @USER@REMOTEHOST ] (2nd format) DESCRIPTION
Hdup is used to backup a filesystem. Features include: o incremental backups: monthly, weekly and daily dumps, o encryption of the archive (via mcrypt or GPG), o compression of the archive (bzip/gzip/lzop/none), o possibility to transfer the archive to a remote host, o possibility to restore the archive from a remote host, o ability to split up archives, o no obscure archive format (it is a normal compressed tar file), and o simple to use. The behaviour of hdup is controlled by its configuration file (see hdup.conf(5)). Internally hdup uses GNU tar to actually create the back- ups. First format When using the 1st format hdup performs a backup. Remember: hdup pushes a backup from the localhost to the remote host. The sort of backup is specified by SCHEME: monthly Make a full (null) dump of the filesystem. weekly Make an incremental dump of the filesystem relative to the latest monthly dump. If hdup cannot find a monthly dump it will complain, unless always backup is on. Then a monthly dump will be performed. daily Make an incremental dump of the filesystem relative to the latest weekly dump. If hdup cannot find a weekly dump it will complain, unless always backup is on. Then a weekly dump will be performed. HOST is the host of which hdup should perform the backup. This should match a '[HOST]' statement in the configuration file. The directories of that host (specified with 'dir = dir1, dir2', ...) will be backed up to the directory specified with 'archive dir = dir'. If HOST is not found no backup will be made. @USER@REMOTEHOST is the host to which the archive should be transfered. This must include the user name. E.g @miekg@elektron.atoom.net. It is illegal to specify the colon ':'. hdup must be present on the remote host. The location of this remote hdup is specified using remote hdup. Any program capable of transferring files can used for this purpose. Currently tested is ssh. Other programs like rsync (not tested) may also work. Any program with the following characteristics will do: o must be usable as a filter (read from stdin, write to stdout), o must support user@remotehost syntax. Second format When using the 2nd format a previous backed up filesystem is restored. Remember: hdup pushes a restore from the remote to the local host. This is opposite from the backup operation! HOST is the host who's archives should be restored. DATE everything up to this date will be restored. hdup will look for the most recent monthly archive, then the most recent weekly and finally for the daily to pad up to date given. The DATE can either be specified as DD-MM-YYYY (date spec = default), as YYYY-MM-DD (date spec = iso) or as MM-DD-YYYY (date spec = american). This is controlled from the configuration file. A special date is 'static' which instructs hdup to look in the 'static' directory. This is used when 'no history = yes'. This is dangerous to use because hdup will overwrite the old backup file with the new one. When your system crashes during the overwrite you have no backup at all! Only use this when you really don't have room for two monthly backups. Another special date is 'today' which instructs hdup to use the current date. DIRECTORY tells hdup to which directory the archive should be untarred to. Be very careful when running hdup as root and specifying '/' as the directory. Version 1.4 and above refuses to restore to '/'. This can be overridden by specifying 'force = on/yes' in the configura- tion. @USER@REMOTEHOST is the host to which the archive should be restored. This must include the user name. E.g @miekg@elektron.atoom.net. As as version 1.6.6 it is illegal to specify the colon ':'. On the remosthost and in DIRECTORY the archive is restored. hdup must be present on the remote host. Status message When hdup is finished with its current operation it will print an overview message: Hdup version.: 1.6.6 Host.........: elektron Date.........: 2003-02-02 Scheme.......: monthly Archive......: elektron.2003-02-02.monthly.tar.gz Encryption...: no Archive size.: 257k Elapsed......: 0:01:27 Status.......: successfully performed backup Which can be mailed to you via cron. OPTIONS
-c, --config=config Location of the configuration file. The default location of hdup's configuration file is /etc/hdup/hdup.conf. -s, --specific=file Restore a specific file from an archive. file must be the full path to the file, relative paths will not work. -i, --ignore-tar Ignore tar errors when restoring. -I, --ignore-conf Ignore errors in the configuration file. -P, --patched_tar Tar is patched so that it can handle --no-recursion, --listed-incremental and --files-from together. This options enables two things in hdup; 1) directory info is written to 'filelist' and 2) --no-recursion is given to tar. This solves the bug whereby hdup wouldn't include directory information in the archives. -d, --dryrun Do a dryrun - don't do anything with the filesystem -q, --quiet Suppress the output of the subprocesses (like 'tar' and 'ssh'). -q -q, --quiet --quiet Suppress the logging output from hdup. -q -q -q, --quiet --quiet --quiet No logging at all. Even no overview message. -V Be more verbose. -V -V Be even more verbose. This will show which files are backed up by hdup IF you also supply the -D option. -h, --help A help message. -v, --version Show the version of hdup. -D, --debug Show a lot of information which can aid debugging. The -V and -q options do not effect each other. A '-qqq -VV' option list will mean that hdup will show what is run, but nothing else (no overview message and no warning nor errors). ENCRYPTION
hdup can encrypt the archives, mcrypt is used for the actual encryption. As of version 1.6.25 GPG can also be used to encrypt the archive. Note that currently remotely restoring a GPG encrypted archives is not working. mcrypt With mcrypt --list you get a list of the algorithms mcrypt supports: ... serpent (32): cbc cfb ctr ecb ncfb ofb nofb wake (32): stream loki97 (32): cbc cfb ctr ecb ncfb ofb nofb rijndael-128 (32): cbc cfb ctr ecb ncfb ofb nofb rijndael-192 (32): cbc cfb ctr ecb ncfb ofb nofb ... If you want to use loki97 you specify algorithm = loki97 in hdup.conf. The same goes for all the other algorithms. GPG To use GPG the following is needed. Set algorithm = gpg and key = user ID of key. In my case I've created a GPG key with user ID of 'miekg' so I use: algorithm = gpg key = miekg The key is supplied to gpg with the -r argument. See the manpage of gpg for more details. When restoring a GPG encrypted archive you will be prompted to unlock your private key. AUTHOR
Written by Miek Gieben. Wouter van Gils helped a lot with testing pre-release versions. User feedback is appreciated. REPORTING BUGS
Report bugs to <hdup-user@miek.nl>. BUGS
The %a expansion is not always the same in the prerun and postrun scripts (when using encryption). LIMITATIONS
Under Linux kernel version 2.2 the archive size cannot exceed two (2) Gigabyte. If you need larger archives sizes you should upgrade your kernel. You can however solve this by using chunk size. Just define your maximum allowed size, something like chunk size = 1800M and you're set. If you encrypt archives and want to restore them, you are forced to use one encryption scheme for all the backups. hdup does not store the key and algorithm with the archive, thus it is impossible to restore archives that use different keys and algorithms. COPYRIGHT
Copyright (C) 2001-2005 Miek Gieben. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSO
hdup.conf(5) for information about hdup's configuration file. 18 Mar 2003 hdup(1)
All times are GMT -4. The time now is 08:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy