Librenix
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Rsnapshot: Archive, Snapshot, Backup MySQL Databases on Debian

Up
vote
Down

This howto will show you how to install and set up Rsnapshot, enable archiving of snapshots and how to back up MySQL databases on Debian. Rsnapshot is a filesystem snapshot utility for making backups of local and remote systems. Using rsync and hard links, it is possible to keep multiple, full backups instantly available. The disk space required is just a little more than the space of one full backup, plus incrementals. read more...
permapage | score:9128 | -falko, January 14, 2013

Tutorial: Create Encrypted FTP backups with duplicity, duply on Debian 6

Up
vote
Down

When you rent a dedicated server nowadays, almost all providers give you FTP backup space for your server on one of the provider's backup systems. This tutorial shows how you can use duplicity and duply to create encrypted backups on the provider's remote backup server over FTP. duply is a duplicity wrapper script that allows us to use duplicity without interaction (i.e., you do not have to type in any passwords). read more...
permapage | score:9111 | -falko, July 9, 2012

Scripting: A parallel Linux backup script

Up
vote
Down

This example bash shell script demonstrates a simple method of creating backups of multiple filesystems to multiple tape devices simultaneously. While the script presented writes to four tape drives in parallel, it can easily be modified to write to other device types and to create a different number of backup streams. The script is set up for the bash shell under Linux, but modifying it for another variety of Unix should simply be a matter of changing the locations of utility files such as tar, echo, cp, and sleep.

The script can be downloaded from http://librenix.com/scripts/par.tar.sh. Download the file now and load it into an editor as this article will refer to it frequently. Also, you may want to modify bits of it to match your filesystem names and your devices.

The first line of the script looks like this:
 #!/bin/bash
If the bash shell isn’t in the /bin directory on your system, you’ll need to modify this line. Enter the command which bash now to verify the location of bash. My Fedora Linux system and my Mac OS X system both have bash in /bin, but my FreeBSD system does not. If you have a non-Linux flavor of Unix, you’ll probably need to use the ‘which’ command to verify the locations of each command used in the script. The commands used are:
 bash
cd
sleep
echo
date
tar
wait
ls
wc
Note that ‘wait’ and ‘cd’ are usually implemented as internal shell commands and may not have external commands associated with them. If that is true for your system, leave ‘cd’ and ‘wait’ with no directory prefix just as they are in the original script.

Now, the first command in the script resets the current working directory to ‘/’:
 cd /
Since the script precedes each directory to be backed up with a ‘.’ to represent the current working directory, starting out at ‘/’ is necessary. The reason for this precaution is that some implementations of the tar command will only load files from a tar archive into the exact directory that was specified when the file was backed up. By prefixing the names with a ‘.’ we preserve the ability to recover the files into any subdirectory we want, without overwriting the original files.

Immediately after the ‘cd /’ command is where you would put any commands to shut down all services that must be quieted prior to a backup. The example script has a (commented out) command to initiate an Oracle database shutdown followed by a ‘sleep’ command to allow time for the shutdown to complete. The example database shutdown and the following delay probably don’t apply to your system. Obviously, you’ll have to add commands yourself to stop any applications that might interfere with the backup.

Next, we use the ‘date’ command to create two sets of four tiny files to stick at the start and end of each tape. Note that the presence of a ‘date.#’ file at the beginning of each tape lets you quickly find out when a tape was created and on which drive. The ‘zzzz.#’ files, appended to the end of each tape, only serve to let you easily verify that a backup completed without overrunning the end of the tape.

Next, we start the four actual ‘tar’ backup commands, each with sample directories named ‘./dir1’, ‘./dir2’, etc. Of course, you’ll need to modify the list of directories to match the actual directories you wish to back up. Note that you’ll probably want to balance the directory sizes so that all of the largest directores aren’t on the same tape. Also, note that each ‘tar’ command is run in the background and logs to a tar.#.log file in the /tmp directory. Obviously, you might want to put the logfiles somewhere else.

After each ‘tar’ command there is an entry like this: ‘TASK=$0’, or ‘TASK=$1’. These arbitrarily-named ‘TASK’ variables are used to store the process ID of each ‘tar’ command so that the script can wait for them with the four ‘wait’ commands that follow in the next block of code. There, we have the four ‘wait’ commands waiting on the $TASK0, etc, variables. (The addition of the ‘$’ to each TASK# shell variable is not a typo -- it’s necessary to read back the contents of the variable.)

Next, after the script has waited for the completion of each of the four ‘tar’ commands, it appends some information to a history file for later reference. It stores the date of the backup, the filesize of the logfile, and the number of files backed up on each tape to each of four history files. While the script will overwrite the logfiles (tar.#.log) each time it is run, it will append these three lines to each of the four history files (tar.#.history).

The final steps in the script are commented out. Those are the commands necessary to restart any applications that were brought down for the backup. Again, in the example we assume an Oracle database needs to be restarted. You’ll need to add the commands necessary to start any applications that were stopped at the beginning of the script.
mail this link | permapage | score:8941 | -Ray, April 10, 2005

Tutorial: Making Linux / UNIX snapshot backups

Up
vote
Down

I’d like to configure my Debian box to backup two remote servers using rsnapshot software. It should make incremental snapshots of local and remote filesystems for any number of machines on 2nd hard disk located at /disk1 ( /dev/sdb2). How do I make backups?

rsnapshot saves much more disk space than you might imagine. The amount of space required is roughly the size of one full backup, plus a copy of each additional file that is changed. rsnapshot makes extensive use of hard links, so if the file doesn’t change, the next snapshot is simply a hard link to the exact same file. read more...
mail this link | permapage | score:8806 | -nixcraft, February 12, 2008

Back up Fedora files with Fwbackups

Up
vote
Down

This document describes how to set up, configure and use Fwbackups on a Fedora 8 desktop. The result is an easy-to-use backup system for desktop usage. Fwbackups creates partial backups which can be stored locally or on a removable device. You have also the option to run scheduled backups. read more...
permapage | score:8598 | -falko, February 28, 2008

Tutorial: Red hat / CentOS Remote Snapshot Backup Server

Up
vote
Down

rsnapshot is easy, reliable and disaster recovery backup solution. It is a remote backup program that uses rsync to take backup snapshots of filesystems. It uses hard links to save space on disk.

You can easily build remote / local backup server to keep snapshots in in hourly, daily and monthly format. read more...
permapage | score:8528 | -nixcraft, July 10, 2008

JBackpack: Personal backup program

Up
vote
Down

JBackpack is a personal backup program. It features incremental backups, network transparency and encryption. JBackpack uses rdiff-backup for all backup and restore functions, SSHFS and SMB to access remote file systems and EncFS to encrypt backup destination directories.JBackpack uses rdiff-backup for all backup and restore functions. The most interesting feature of rdiff-backup is incremental backups. read more...
permapage | score:8434 | -gg234, April 23, 2012

Bacula Network Backup Implementation Guide

Up
vote
Down

This is very detailed tutorial for implemeting bacula network backup in debian linux. This tutorial consists of four pages.

Bacula is a set of computer programs that permits you (or the system administrator) to manage backup, recovery, and verification of computer data across a network of computers of different kinds. Bacula can also run entirely upon a single computer, and can backup to various types of media, including tape and disk.

In technical terms, it is a network Client/Server based backup program. Bacula is relatively easy to use and efficient, while offering many advanced storage management features that make it easy to find and recover lost or damaged files. Due to its modular design, Bacula is scalable from small single computer systems to systems consisting of hundreds of computers located over a large network. read more...
mail this link | permapage | score:8388 | -gg234, June 7, 2006

BackupPC Installation And Configuration

Up
vote
Down

BackupPC is a high-performance, enterprise-grade system for backing up Linux and WinXX PCs and laptops to a server's disk. BackupPC is highly configurable and easy to install and maintain.
A clever pooling scheme minimizes disk storage and disk I/O. Identical files across multiple backups of the same or different PCs are stored only once resulting in substantial savings in disk storage and disk I/O.
read more...
permapage | score:8386 | -gg234, June 19, 2006

Tutorial: Set up Postfix as a backup MX

Up
vote
Down

In this tutorial I will show how you can set up a Postfix mailserver as a backup mail exchanger for a domain so that it accepts mails for this domain in case the primary mail exchanger is down or unreachable, and passes the mails on to the primary MX once that one is up again. read more...
permapage | score:8294 | -falko, June 25, 2007

Amanda: Disk backup on Debian

Up
vote
Down

Amanda is an open source client/server solution to back up filesystems. Backups are triggered by the backup server, backup definitions are located on the servers but exclusion lists are located on the client. read more...
permapage | score:8281 | -falko, June 17, 2010

Back up MySQL Databases with mylvmbackup on Debian 6

Up
vote
Down

mylvmbackup is a Perl script for quickly creating MySQL backups. It uses LVM's snapshot feature to do so. To perform a backup, mylvmbackup obtains a read lock on all tables and flushes all server caches to disk, creates a snapshot of the volume containing the MySQL data directory, and unlocks the tables again. This article shows how to use it on a Debian Squeeze server. read more...
permapage | score:8248 | -falko, May 11, 2012

Tutorial: Backup LVM Partitions with Snapshots

Up
vote
Down

This tutorial shows how you can create backups of LVM partitions with an LVM feature called LVM snapshots. An LVM snapshot is an exact copy of an LVM partition that has all the data from the LVM volume from the time the snapshot was created. The big advantage of LVM snapshots is that you do not have to worry about open files and database connections, and you do not have to interrupt/halt services on the live partition because a snapshot is usually created in fractions of a second, so your users will not notice any disruption, and your snapshot holds consistent data. read more...
mail this link | permapage | score:8241 | -falko, April 18, 2007

Linux Backup: Simple Backup Suite

Up
vote
Down

Simplify your backup procedures with the Simple Backup Suite.
The simple-backup-config tool allows users to choose either a simple backup scheme that performs incremental backups daily and full backups weekly, or to modify the default scheme with their own settings. Users list directories to backup in the Include tab, and select items to exclude in the Exclude tab. Exclusions can be based on directory (e.g., /var/cache), file type (sbackup excludes multimedia files by default), file size (10MB is the default upper limit), or regular expression.
read more...
mail this link | permapage | score:8232 | -Ray, November 29, 2005

Tutorial: Backup Ubuntu with Sbackup

Up
vote
Down

SBackup is a simple backup solution intended for desktop use. It can backup any subset of files and directories. Exclusions can be defined by regular expressions. A maximum individual file size limit can be defined. Backups may be saved to any local and remote directories that are supported by gnome-vfs. There is a Gnome GUI interface for configuration and restore. read more...
permapage | score:8209 | -gg234, March 22, 2007

Backup MySQL with Zmanda Recovery Manager

Up
vote
Down

Zmanda Recovery Manager (ZRM) for MySQL simplifies life of a database administrator who needs an easy to use yet flexible and robust backup and recovery solution for MySQL server.
  • Schedule full and incremental logical or raw backups of your MySQL database
  • Centralized backup management with monitoring and email status notification
  • Verify your backup images
  • Compress and encrypt your backup images
  • Recover database easily to any point in time or to a particular database event
read more...
mail this link | permapage | score:8060 | -gg234, September 10, 2008

mysqlhotcopy: Hot Backup of MySQL

Up
vote
Down

If you need to make live backups of your MySQL database, this is how you can do it.
If you want to make a hotcopy from your SQL database instead of a dump to a text file, you can use the mysqlhotcopy tool. This tool locks a table, copy it and than unlocks it again.

Use this command if you want to transfer the MySQL data to an other place on the same server...
read more...
permapage | score:7980 | -Ray, December 22, 2005

Mondo Rescue: Free Linux backup and rescue

Up
vote
Down

You can also use Mondo to clone your current Linux system.
Mondo Rescue backs up your file system to CD, tape, NFS (archives stored remotely) or ISO's (archives stored locally). Mondo uses afio as the backup engine; afio is a well-respected replacement for tar. In the event of catastrophic data loss, you may restore some or all of your system, even if your hard drives are now blank. Mondo Rescue can do a lot of other cool things
read more...
permapage | score:7956 | -Ray, October 8, 2003 (Updated: October 24, 2004)

Newbie Command Line: Linux Backup

Up
vote
Down

Backups aren't important -- until you need them.
Quick. When is the last time you backed up your system? Unless you are a system administrator by trade, I bet 95% of you haven't done so recently. If you suffer a hard drive crash, you stand to lose all your recent email, work, notes, photos, bookmarks, and whatever. One reason for that might be the paucity of a easy to use backup tools. Let's bury that reason once and for all.
read more...
permapage | score:7936 | -Ray, May 21, 2004

Backup Linux to Amazon S3 with s3cmd

Up
vote
Down

S3cmd is a program that allows you to backup your Linux box to Amazon S3. Amazon S3 allows you basically unlimited storage and, as long as you have the bandwidth, you can use it from any location. There are two options in a backup that you can use: you can either copy all the files over to an S3 bucket (called put) or you can use the sync command to sync file changes on a regular basis. read more...
permapage | score:7921 | -pinehead, April 2, 2012
More articles...
Gallery Wrapped Abstract Art

Recent headlines

Tutorial: Create an NFS-like Storage Server with GlusterFS on Ubuntu 12.10

10 basic examples of Linux ps command

LG 8-inch G Pad 8.3 Android tablet

Tutorial: Webcam streaming your desktop plus audio with ffmpeg, crtmpserver, Flowplayer

How to install HotShots on Fedora 19 and Ubuntu 13.04

OpenVZ Mount Tutorial: Mount Host Devices, Partitions, Directories in Containers (Debian, Ubuntu)

OpenBSD Tutorial: Configure Ralink USB Wireless Adapter

Tutorial: Debian 7 Samba Server with tdbsam

CoolShip Android all-in-keyboard computer

Install openQRM 5.1 on Debian 7

Dual-boot Windows 7 and Ubuntu 12.04 on a PC with UEFI board, SSD and HDD

Linux find command examples: finding files

Virtual Users/Domains with Postfix/Courier/MySQL/SquirrelMail (Debian 7)

Ubuntu Edge: Is there life after an unsuccessful crowd-funding campaign?

Upgrade Fedora 18 to 19 With FedUp

Epoptes – Open source computer lab management and monitoring tool

Elementary OS 0.2 Luna review

Tutorial: Fedora 19 Samba server with tdbsam

Setup Nginx + php-FPM + apc + MariaDB on Debian: The perfect LEMP server

Tutorial: Install Debian 7 (testing) with debootstrap from a Grml live Linux

Linux mail command examples: send mails from command line

Pipelight – Using Silverlight in Linux browsers

Using Multiple PHP Versions (PHP-FPM FastCGI) With ISPConfig 3 (Ubuntu 12.04)

Sagemath in the Cloud and Sagemath 5.11

Tutorial: Replace Windows with Ubuntu 13.04

Unix: Shell Script Wrapper Examples

Tutorial: Running CS-Cart on Nginx on Debian 7/Ubuntu 13.04

Hand of Thief trojan and your favorite Linux distribution

OpenShift Online: a non-developer guide

Plasma Media Center 1.1 and digiKam 3.3

Linux Iptables Examples

Nuvola Player: Enjoy all your Cloud music services from one interface

Tutorial: Automatically add a disclaimer to emails with alterMIME (Postfix on Debian 6)

Set up Oneiric PVHVM at Xen 4.1.2 Ubuntu 11.10 Dom0

Ubuntu is not a community distribution

Lynis: Security and system auditing tool

Tahoe Least-Authority File System for secure, distributed data storage

TuxOnIce: Hibernate Linux

Tutorial: Ubuntu Jeos 12.04 LTS Spam Filter Gateway Server

LinSSID – Graphical wireless scanning for Linux

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin