I succesfully created a backup script that creates CPIO archives preserving access times and etc. I orginally created the CPIO archives using the absolute paths.
Code:
find / -depth | grep -f include| cpio -oavc | gzip > archive.cpio.gz
I am trying to extract a cpio archive into a temp directory to check to make sure things are backing up and things are ok but am having trouble because it complains about permissions and will not restore in the current directory. So
Code:
mkdir /home/testuser/extract
cd /home/testuser/extract
user@extract>gunzip archive.cpio.gz
-rw-rw-r-- 1 tester testuser 1314521600 2012-02-21 13:21 archive.cpio
user@extract>cpio -i --no-absolute-filenames < 10.7.0.180.cpio
cpio: var/lib/dpkg/info/libgnome-bluetooth7.md5sums: Cannot open: Permission denied
cpio: var/lib/dpkg/info/humanity-icon-theme.postrm: Cannot open: Permission denied
cpio: var/lib/dpkg/info/libmono-system2.0-cil.md5sums: Cannot open: Permission denied
cpio: var/lib/dpkg/info/telepathy-butterfly.preinst: Cannot open: Permission denied
cpio: var/lib/dpkg/info/ufw.md5sums: Cannot open: Permission denied
cpio: var/lib/dpkg/info/tsconf.list: Cannot open: Permission denied
cpio: var/lib/dpkg/info/acpid.md5sums: Cannot open: Permission denied
cpio: var/lib/dpkg/info/libstdc++6.shlibs: Cannot open: Permission denied
cpio: var/lib/dpkg/info/libavc1394-0.postinst: Cannot open
????