backup a big partition using cpio

hi

Howto backup a 40GB /usr partition from the old freeBSD 4.6 system using cpio?
cpio cannot deal with files > 2GB
Is it any way to split the output to many backup files?
 
Keep it simple use tar, dump/restore, cp

[You can split/join files with dd, but you can do lots of damage as well, if you aren't careful. But I didn't tell you that]
 
Thx, but ist it correct this command to backup the whole /usr partition and split into 1GB files?
Code:
# cd / ; find ./usr -depth -print -xdev | cpio -ovfB | gzip -c | split -b 1000m > /mnt/backup_usr.gz &
 
ccc said:
Thx, but ist it correct this command to backup the whole /usr partition and split into 1GB files?
Code:
# cd / ; find ./usr -depth -print -xdev | cpio -ovfB | gzip -c | split -b 1000m > /mnt/backup_usr.gz &
Do not use the final > /mnt/backup_usr.gz. Use - /mnt/backup_usr.gz_ instead. And split(1) supports gigabytes so -b 1g should work. The underscore is used for more clarity.

# cd / ; find ./usr -depth -print -xdev | cpio -ovfB | gzip -c | split -b 1g - /mnt/backup_usr.gz_


But as already mentioned dump/restore may be easier (and faster).
 
  • Thanks
Reactions: ccc
Back
Top