TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:8536] cpio examples needed...



Carl Wilhelm Soderstrom wrote:
> 2 more q's:
>         how do i restore a single file (or set of files) from within an archive?
	cpio -ivF cpio_file [file_to_restore ...]

the [ ] indication optional file name(s); you can list multiple files

>         how do I do an incremental backup? 

do your full backup and when it's done, create a file so you know when
the last backup was:


	find / |cpio -ovF cpio_fullbackup
	touch /etc/lastbackup

next time you need to do an incremental, only backup files newer then
/etc/lastbackup (these will be the files that have changed).

	find / -newer /etc/lastbackup | cpio -ovF cpio_incremental

this should backup all files newer then /etc/lastbackup

> (and if several copies of a file
> exist on a tape; how do I get information on them to know which one to restore?)
> 

to list files on the tape:
> >        cpio -tvF file_name

you could redirect this to a file and the more the file:

	cpio -tvF cpio_archive > tape.list

hope this helps.
-scot