You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Talk:Make a database dump

From Wikitech-static
Jump to navigation Jump to search

Here's the current image dump code. Suggestions to make it nicer for the disks?

tar -chf $OutputDir/${DATE}_upload.tar $DirLang
md5sum $DirLang/${DATE}_upload.tar >>XX
# Find files >2GB and split them into 2 GB chunks
for infile in `find $OutputDir -size +2000000k -type f -name ${DATE}_\*.tar`; do
        sleep 10
        echo $infile
        split -b2000000000 $infile $infile.
        echo sleeping
        sleep 50
done

Jamesday 04:47, 11 Mar 2005 (UTC)

Mlyle's rough suggestion

tar -chf - $DirLang | piperate -b 20000000 -d 3 -a -p | tee $OutputDir/${DATE}_upload.tar | md5sum |  sed -e s/-\$/$OutputDir/${DATE}_upload.tar/ >>XX 
# Find files >2GB and split them into 2 GB chunks
for infile in `find $OutputDir -size +2000000k -type f -name ${DATE}_\*.tar`; do
        echo $infile
        piperate -b 20000000 -d 3 -a -p < $infile |  split -b2000000000 - $infile.       
        echo sleeping
        sleep 50
done

--68.185.89.121 04:55, 11 Mar 2005 (UTC)