Backing up a remote accessible MySQL database

This may seem as a very specific case since it might seem like a bad idea to expose an SQL database to the world wide web. Even though IP-restrictions may apply it may still be accessible to non authorised personell. Of course there’s a trade-off between security and simplicity and thus something like this might come in handy.

In order to make a dump of the MySQL database you want a tool called mysqldump and is located in the mysql-client package in the Debian repositories. The following command will install the package for you. Remember that you need to use sudo or log in as super user.

sudo apt-get mysql-client

Following this you want to utilise the mysqldump tool. A command may look as follows depending on the use and needs.

mysqldump --host hostaddress -u username -ppassword databasename > databasename.sql

The mysqldump tool will output the databasedump to stdout and thus we want to pipe it to a file, in this case named ‘databasename.sql’. Note that the password should follow exactly after the ‘-p’ flag without any spacing.

Selfhosted software projects

I have a desire to host my own projects for easy access over the internet. Ofcourse GitHub and Bitbucket are both great contenders in making this an easy task but hosting on an external system feels scary and restrictive. This leads me to look for other solutions preferrably open source possible to run on a linux host.

One such alternative is Fossil which as of now feels like a nice alternative. A test setup needs to be done in order to evaluate it’s functionality properly. It has features such as a ticket system, a wiki, and browsable history among other things.

I’ll need to look into this further.

Streaming videos

Streaming video in your home can be a complex problem but with the right combination of software it could be achieved quite simply. In order to accomplish this we first want to make sure all our videos are in a compatible format. Most videos currently stored on the backups can be converted to an appropriate format using the following command on Ubuntu.

avconv -i input.mkv -c:v copy -c:a aac -strict experimental -b:a 192k output.mp4

Combining this with technology such as VideoJS and your solution is close to completed. Of course these needs some sort of http server but using Apache or something similar this may be set up in a jiffy. Only thing really missing is a password protected administration system which may require some sort of LAMP stack.