diff --git a/.project b/.project new file mode 100644 index 0000000..05fe531 --- /dev/null +++ b/.project @@ -0,0 +1,11 @@ + + + hacking_spielplatz + + + + + + + + diff --git a/SQL-Scrapbook2 b/SQL-Scrapbook2 new file mode 100644 index 0000000..97751b3 --- /dev/null +++ b/SQL-Scrapbook2 @@ -0,0 +1 @@ +update users set extern_uid='cn=Michael Rausch,ou=people,dc=maketank,dc=net', provider='ldap' where username = 'mrausch'; \ No newline at end of file diff --git a/raspbmc-backup-fresh.sh b/raspbmc-backup-fresh.sh new file mode 100755 index 0000000..4b8c39d --- /dev/null +++ b/raspbmc-backup-fresh.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +#backup a raspbmc host: +MNT=/mnt +SRC=/dev/mmcblk0 +TO=~do/Documents/Backups/${1} +TSTAMP=$(date +%Y-%m-%d) + +TAR="/bin/tar --sparse --same-owner --preserve-permissions \ + -C $MNT --use-compress-program /usr/bin/pbzip2 -c" + +mount ${SRC}p2 /mnt +mount ${SRC}p1 /mnt/boot + +#prep ENV! +cp -uv /usr/bin/qemu-arm-static ${MNT}/usr/bin +#get selections +chroot ${MNT} dpkg --get-selections |grep -v deinstall >${MNT}/etc/dpkg/package-selections + +${TAR} -f ${TO}/${TSTAMP}_fresh.tar.bz2 /mnt/* + +# finish +umount /mnt/boot +umount /mnt diff --git a/raspbmc-restore.sh b/raspbmc-restore.sh new file mode 100755 index 0000000..2d4c169 --- /dev/null +++ b/raspbmc-restore.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +#backup a raspbmc host: +MNT=/mnt +SRC=/dev/mmcblk0 +TO=~do/Documents/Backups/${1} +TSTAMP=${2} + +TAR="/bin/tar --wildcards --sparse --same-owner --preserve-permissions \ + -C $MNT --use-compress-program /usr/bin/pbzip2 -xv" + +mount ${SRC}p2 /mnt +mount ${SRC}p1 /mnt/boot + +#prep ENV! +cp -uv /usr/bin/qemu-arm-static ${MNT}/usr/bin +#get selections +#chroot ${MNT} dpkg --get-selections |grep -v deinstall >${MNT}/etc/dpkg/package-selections + +${TAR} --exclude=".xbmc/temp/*" -f ${TO}/${TSTAMP}_home_pi.tar.bz2 home/pi +${TAR} -f ${TO}/${TSTAMP}_boot.tar.bz2 boot/*config* +${TAR} -f ${TO}/${TSTAMP}_etc.tar.bz2 etc/passwd +${TAR} -f ${TO}/${TSTAMP}_etc.tar.bz2 etc/group +${TAR} -f ${TO}/${TSTAMP}_etc.tar.bz2 etc/ssh/* +${TAR} -f ${TO}/${TSTAMP}_etc.tar.bz2 etc/apt/* +${TAR} -f ${TO}/${TSTAMP}_etc.tar.bz2 etc/dpkg/* +${TAR} -f ${TO}/${TSTAMP}_etc.tar.bz2 etc/host* + +# finish +umount /mnt/boot +umount /mnt diff --git a/sql-playground.sql b/sql-playground.sql new file mode 100644 index 0000000..c9d7757 --- /dev/null +++ b/sql-playground.sql @@ -0,0 +1,6 @@ +# gitlab stuff; +select * from users where name like 'heiko%'; + +update users set username = 'hhaller' where username = 'heikohaller'; + +select login,firstname,lastname,mail from users where status = 1; \ No newline at end of file