Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filesystem backup to file 2

Status
Not open for further replies.
Jul 28, 2004
726
BE
Hi guys,

Need a little help :

I've got a filesystem , size 13 Gb, 5 Gb used, and I wanna take a filesystem backup , but :
1.backup must be a file ( no 4 mm )
2.tar cannot be used , as this gives problems with open files now and then
3.the backup must be split in files size about 1 Gb per file.

Any suggestions if this is possible ? I've looked at various parameters of the backup command, but couldn't get the outcome I wanted .Even tried the "-L 500m" parameter, but it just stops at 1 file.


kind regards,


R.
 
backup to stdout, pipe to split for 1GB files?

backup -f- /filesystem|split -b 1024m - backupfile

would create backupfileaa, backupfileab, backupfileac ... up to backupfilezz

see man split


HTH,

p5wizard
 
P5 : damn you're good :)
works like a charm

much appreciated !


rgds,


R.
 
for doing the restore of those files, I'd think you will have to glue the split files together somehow, is there a command that will achieve that ? sth like merge or join ...?


rgds,

R.
 
how about "cat"

backup -qf- /filesystem|split -b 1024m backupfile
cat backupfile??|restore -qf-

the -q is to keep backup or restore from asking for an enter prompt.

but try it out with restore -tqf- first



HTH,

p5wizard
 
P5wizard: bit of a thread hijack but can you explain the second hyphen you're using with your options?

Example: backup -qf- or restore -qf-

thanks
 
The - parameter value for the -f flag indicates stdout for backup or stdin for restore - see man page for more info.

Here's the short version:
backup -q -f/dev/rfd0 backs up to floppy which is the default I believe so should be equivalent to:
backup -q
backup -q -f/dev/rmt0 backs up to tape
backup -q -f- backs up to stdout and can be shorthanded to
backup -qf-

The same applies to restore, but for stdin.

The -q flag (quiet) simply does away with the 'Please mount... and press enter' prompt.


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top