Our daily ramblings about stuff

Linux bash remote backup script "Tower of Hanoi"

This is my first-choice backup script, based on the "Tower of Hanoi" game.
The benefith is a smart collection of full backups, that allows you to go back one day, 2 days, 4 days, 8 days 16 days, any power in between or any power of 2 higher.

Just choose the amount of full backups. 9 different "tapes" is already enough to go back more then one year in history.

Original script by Jeremdow. Modified to backup files from a remote server.
It is assumed that you added your SSH key to the remote host, to allow access without a password.

READ POST

ZIP direct download of current node filefield

Add a node menu local task that will create a temporary ZIP file on-the-fly containing files from a file field.
All files of a filefield identified by the field name (defaults to: field_download) will be added to it.
Force a download by the user's browser.

READ POST

Forcibly download a file by FID

Add a record to Drupals menu system with hook_menu
The path download/% will pass % to page callback hook_force_download.
This page callback function loads the file object and returns the file to the users browser as an attachment.
When the fid arguments is not given or there is no corresponding file object, throw an error and show a 404 page with the error message.

The small amount of code proofs the outstanding possibilities of the Drupal framework once again.

READ POST

Drupal large file uploads up to 8GB

This code should work with files up to 8GB.
Apache in combination with Suhosin security patch & pecl upload progress bars (AJAX).
Put this into the php.ini file or where ever you store your PHP config.

READ POST

Install Drupal with Drush in minutes

With the help of Drush you can speed-up Drupal installations with a factor 100.
We presume you are using Debian or Ubuntu.
We also presume that the mysql user is limited to localhost access.
Other Linux distro's need a small change in command given.

First you need to install Drush.
sudo apt-get install drush

Download the latest recommended release of Drupal core.
drush dl

READ POST

Drush logo

Pages