This is a small bashscript i wrote to backup my mobile phone addressbook into LDIF format to import in LDAP. It uses gnokii to dump the phone/sim addressbooks.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#!/bin/bash OUTFILE="./addressbook_$(date +"%Y%m%d-%H%M%S").ldif" ERRLOG="/tmp/gnokii-backup-errlog-$(pwgen 10 1).log" echo > "$OUTFILE" echo -n "Backupping SIM memory ... " gnokii --getphonebook SM 1 end -l >> "$OUTFILE" 2> "$ERRLOG" && echo "[ DONE ]" || echo "[FAILED]" cat "$ERRLOG" | sed "s/^/ /g" rm "$ERRLOG" echo -n "Backupping PHONE memory ... " |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!/usr/bin/env python """ MySQL Database Backupper Copyright (C) 2008 Samuele ~redShadow~ Santi - http://hackzine.org This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!/bin/bash # # archive.sh - A fast archiver, useful for making snapshots # Copyright (C) 2008 Samuele ~redShadow~ Santi # http://hackzine.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY |