Wednesday, September 24, 2014

simple cpio script

rsync is fine. but seeding a directory first is better. i like to do this on local private networks with cpio because the compression and security aren't really a concern.
thus, a simple, recursive cpio script. for dumping a local directory to an nfs mount.
#!/bin/sh
echo start "$(date)" >> /var/log/cpio.log ;
find /home/ -depth -print0 | cpio -0pdumv /nfs/mount ;
echo end "$(date)" >> /var/log/cpio.log ;

No comments: