Dec 072011
 

You can upgrade Lion’s version of rsync (2.6.9) to 3.x (currently 3.0.9) via Homebrew:

brew install https://raw.github.com/Homebrew/homebrew-dupes/master/rsync.rb

Backing up a remote folder to a local one works like this then:

rsync -avz -e ssh www-data@example.com:/var/www/ /var/www/

Resources

VN:F [1.9.22_1171]
Rating: 10.0/10 (2 votes cast)
Mar 152011
 

Possible Choices

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jan 262011
 

The backup of a webserver is not always as straightforward as the backup of your computers at home or just a single website etc. This blog states how I do it.

#!/bin/bash

### set to the server address of your server:
serveraddress=example.com

## login as root and create the file /serverbackup.tar.gz containing /etc /var and /home but without some not-so-important dirs:
ssh root@$serveraddress 'cd /; tar cfvz serverbackup.tar.gz /etc /var /home --exclude "/var/log" --exclude "/var/cache"'
## copy the file to your local machine and name it according to the current date:
scp root@$serveraddress:/serverbackup.tar.gz ./server-backup_`date +%Y-%m-%d`.tar.gz

I don’t explicitly backup my MySQL databases but I can start mysql in a chroot environment and usually can recover almost all data.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jan 202011
 

I wrote my own shell script to create a backup of this WordPress blog as I was not happy with the ready to use backup plugins for WordPress such as wp Time Machine.

The script creates two files during the backup process. One that contains all the files in the installation directory of the WordPress installation (so the PHP files including the additional modules, the .htaccess file etc.). The other file contains the SQL dump of the MySQL database used by WordPress (all the tables! If you have tables of other web applications stored in that database, those will be included in the backup!).
So here it is, the script that I run on the server where I have the WordPress blog installed in /var/www/blog to back the installation up into the directory ~/blog-backup:

Jan 122011
 

To make a backup of the saved passwords in Ubuntu just make a backup of the folder ~/.gnome2/keyrings/. This is where Gnome stores its password keyrings (named something like somename.keyring).

You can also export all your passwords from the Gnome Keyring using the python module keyring as described in this blog post by Michael Susens-Schurter. (A backup of his script can be found on https://gist.github.com/947237).

Resources

http://forum.ubuntuusers.de/topic/passwoerter-aus-seahorse-exportieren

VN:F [1.9.22_1171]
Rating: 9.0/10 (1 vote cast)
Feb 092010
 

With two little tools (dd and hexdump) you can use your command line to inspect / investigate the master boot record of a hard disk.

The command is

sudo dd if=/dev/sda bs=512 count=1 | hexdump -C

where /dev/sda is the hard disk you want to inspect.

So here I provide an example of a USB stick I recently bought. It contains the master boot record:

Feb 092010
 

Easily create an iso image using mkisofs from command line.

To produce an ISO image of a directory (with -J Joliet extensions; with -r Rockridge extensions; with -R Rockridge extensions preserving rights and ownerships; with -V to set the Volume-ID) run:

mkisofs -J -R -o image.iso -V "Data Backup" folder/data

resources:

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Feb 092010
 

While it is very convenient to have all mail available online and it is cheap (Google Mail offers a lot of storage for free), you might sleep better at night if you were sure to have a copy of you mail on your own hard disk drive at home. offlineimap is an open source python software available in most Linux distributions that does the job.

Install using:

sudo aptitude install offlineimap

Edit the configuration file ~/.offlineimaprc and provide up your IMAP connection details:

Feb 092010
 

To dump / backup your IMAP Mail Folder to a local directory, there are some projects in the Ubuntu repositories:

looked for last changes on 2010-01-10

not yet in the repositories

more found on http://www.linux-france.org/prj/imapsync/README → SIMILAR SOFTWARES :

Feb 082010
 

Unison is a great tool to keep directories and files synchronized. It is extremely simple to use once you figure out how to do the setup and it can be done automatically (via a cronjob).

I show you here how to do it:

If you are not sure if used Unison before, make a backup of the default configuration file:

mv ~/.unison/default.prf ~/.unison/default.old.prf

Then start your first synchronization run manually:

unison ~/university/ ssh://philipp@lion//home/philipp/university

Where lion may be a hostname or IP in your local network or a domain name or IP on the Internet (your server or your dyndns host at home).
After the synchronization finished, you have a new file ~/.unison/default.prf containing the settings of the last run: