Skip to content

Instantly share code, notes, and snippets.

@white-gecko
Created March 12, 2018 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save white-gecko/22a67eb043c954fcf0275299a9a3b75a to your computer and use it in GitHub Desktop.
Save white-gecko/22a67eb043c954fcf0275299a9a3b75a to your computer and use it in GitHub Desktop.
aksw.org backup script
#!/usr/bin/env bash
cd /home/seebi/backups
echo "dump_one_graph ('http://aksw.org/', '/tmp/akswdump_', 1000000000);" | isql-vt -U dba -P "the_password" >/dev/null
cp /tmp/akswdump_000001.ttl aksw.org.ttl
rapper -q -i turtle -o turtle /tmp/akswdump_000001.ttl >aksw.org.ttl
rapper -q -i turtle -o ntriples aksw.org.ttl | sort >aksw.org.nt
echo "dump_one_graph ('http://localhost/OntoWiki/Config/', '/tmp/owconfigdump_', 1000000000);" | isql-vt -U dba -P "the_password" >/dev/null
rapper -q -i turtle -o turtle /tmp/owconfigdump_000001.ttl >owconfig.ttl
rapper -q -i turtle -o ntriples owconfig.ttl | sort >owconfig.nt
git add -u
git commit -m "backup"
cp -R /var/lib/virtuoso-opensource-6.1/db/* /home/seebi/db/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment