Direkt zum Inhalt | Direkt zur Navigation

Benutzerspezifische Werkzeuge
Anmelden
Home Produkte

Hosting

schon ab €14,00!

Software-Entwicklung

Wir programmieren alles, was wir hosten.

Lösungen

Web & E-Commerce

Kollaboration

Hosting & Skalierbarkeit

Support Open Source

Python

PHP

Weitere

Über uns

Kontakt

Wir

Sie sind hier: Startseite Open Source Weitere rsync-backup

rsync-backup

If you have nothing more than ssh to connect to a host and want to backup it, here's a nice, somehow scalable and nicely declarative configurable solution.

README

Rsync-Backup

TO RESTORE SOMETHING, GO TO THE END OF THIS FILE AND READ THE RESTORE SECTION!

Introduction

This is a rsync-backup for many hosts. Although it has no theading, you can easily configure several hosts to be backed up.

All you need is a working ssh connection without password protection, so rsync can connect from a batch.

Conventions

The base-dir of the backup scripts is called <backup_base>.

Technical overview


There's a nodes-directory where the node's data and their configuration is stored. These are the files:

config  A few configurable options, mostly defaults are ok
exclude A list of files/dirs to exclude. Syntax is from rsync.
data    The directory where the daily snapshots are kept.


This is a rsync / hardlink - based backup. All same files are just hardlinked, which doesn't cost much space, but means if you CHANGE something in a backed up file, you CHANGE it in ALL SAME BACKED UP FILES as long as they didn't change in time. Well, usually you simply don't touch any backed up files. Just be warned.

Different files are copied over. There's no space saved on similar or same parts of the files.

All nodes defined in

<backup_base>/nodes

will be backed up on each call of

<backup_base>/bin/backup.sh

Creating a node

Creating a node can be done by simmply creating the files seen in the "Technical overview" part of this document, or by simply calling

<backup_base>/bin/newnode.sh my.new.server.int

This will create a skel directory from

<backup_base>/.skel

which is perfectly filled with default values. It's just there to save time ;) Of course you may change your .skel-values if you need to.

Backup

To backup all nodes, just call

<backup_base>/bin/backup.sh

To backup a single node, just call

  <backup_base>/bin/_backup.sh <backup_base>/nodes/your.node.int

The script needs to get the path to the node's home.

Restore

To restore something you can have a live view on the backup'd data by simply going to

<backup_base>/nodes/your.node.int/data/<your path>

You can then "restore" the data by copying it over to where it belongs / was backed up from, e.g. by scp or rsync.