Created
July 13, 2015 18:11
-
-
Save akrzos/2ea19fa7e0034a112da3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export BDIR=/home/backup/20150623-genrepos-synced-cv-created | |
mkdir -p $BDIR | |
chmod 770 $BDIR | |
chgrp postgres $BDIR | |
cd $BDIR | |
katello-service stop | |
service foreman-proxy stop | |
sync; sync; echo 3 > /proc/sys/vm/drop_caches | |
tar --selinux -cvf pulp_data.tar /var/lib/pulp /var/www/pub | |
service mongod start | |
sleep 5 | |
mongodump --host localhost --out $BDIR/mongo_dump | |
service mongod stop | |
service postgresql stop | |
sync; sync; echo 3 > /proc/sys/vm/drop_caches | |
service postgresql start | |
su postgres -c "pg_dump -Fc candlepin > $BDIR/candlepin.dump" | |
su postgres -c "pg_dump -Fc foreman > $BDIR/foreman.dump" | |
su postgres -c "pg_dump -Fc gutterball > $BDIR/gutterball.dump" | |
df -h >> $BDIR/df-h | |
df >> $BDIR/df | |
service foreman-proxy start | |
katello-service start | |
cd ~ | |
hammer -u admin -p changeme ping |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment