On 16/04/15 09:55, Wido den Hollander wrote: > It's on my radar to come up with a proper mirror system for Ceph. A > simple Bash script which is in the Git repo which you can use to sync > all Ceph packages and downloads. I've now set up a mirror of ceph/rpm-hammer/rhel7 for our internal use and a simple snapshotting script copies the mirror to a date-stamped directory using hard links so as not to eat up lots of disk space. the key bits of the script look somewhat like this (I'm copying/pasting and editing without testing the results, and missing out various error checks and information messages, so please don't just copy this into a script blindly ;-) #!/bin/bash DDD=`date +%Y%m%d` MIRRDIR=/fileserver/rhel/ceph SNAPDIR=/fileserver/rhel/ceph-snapshots/ceph-$DDD RSYNCSRC=rsync://eu.ceph.com/ceph mkdir -p $SNAPDIR # copy flags: a = archive, l = hard links, r = recursive, # u = updated/newer files, v = verbose # trailing slash style otherwise we end up with ceph-yymmdd/ceph/ nice cp -alruv $MIRRDIR/* $SNAPDIR/ if [ $? != 0] ; then echo "error" exit fi # add other versions here: for SRC in rpm-hammer/rhel7 rsync --bwlimit=1024 -aiH --no-perms --numeric-ids \ --delete --delete-after --delay-updates \ --exclude="*.i686.rpm" \ $RSYNCSRC/$SRC/ $MIRRDIR/$SRC/ _______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com