Operating System - HP-UX
1752795 Members
5936 Online
108789 Solutions
New Discussion юеВ

Backup difference in HP-UX

 
Mark Ellzey
Valued Contributor

Re: Backup difference in HP-UX

Tieu,

While tar itself cannot do a incremental or differential backup, I use tar on Sun systems to do incremental backups. Here's how I do it:

When I run a full backup of the machine on the weekend, once the backup is done, I write a file to a directory. This file is my 'flag file'. Then the next day, when I want to backup only the changes that have occured since the last full backup, I first search the directory for files 'newer' than the flag file. These would be any files that have been created or changed since the last backup. I write the results of the find to a file and then use that list as the source of files to backup for tar.

That's about it. Keep in mind that this is not a true incremental backup, but suffices for my needs.
Tieu Cong Thang
Occasional Advisor

Re: Backup difference in HP-UX

Thanks every one I have used the way of Dannis, I used two command
tar -cvf /dev/rmt/0mn $(find ...)
Tieu Cong Thang
Occasional Advisor

Re: Backup difference in HP-UX

Thanks every one and I have used the way of Dannis, I have used two command:
$ tar -cvf file.tar $(find path -mtime days)
TwoProc
Honored Contributor

Re: Backup difference in HP-UX

Mark, you should probably change that strategy to: creating a file just *BEFORE* the backup starts. If you're not creating the file until the backup ends, then you miss all of the files that changed *after* they were added to the backup, but *before* the file was written when the backup ended. This gap in time that you're missing could easily be 4 to 8 hours long. However, if nothing else runs during a backup (that is, all services and applications are down) and no logins are allowed, then your strategy is fine. Remember, backing up a few extra files in a backup is not a problem, but backing up too few files in a backup can be a huge problem.
We are the people our parents warned us about --Jimmy Buffett
Dennis Handly
Acclaimed Contributor

Re: Backup difference in HP-UX

>I have used two command:
$ tar -cvf file.tar $(find path -mtime days)

"days" above would probably be -days for all files modified less than days ago.

TwoProc's point is that you should creating a reference file and use -newer ref-file, instead of -days.

In both cases, this will not work if there are too many files to fit on the command line. Using pax(1) would work:
$ find path -newer ref-file | pax -w -f file.tar