msgbartop
A cronological documentation test project, nothing serious, really!
msgbarbottom

24 Sep 2012 Using rsnapshot as backup solution

This post describes short how to use rsnapshot as a remote filesystem snapshot utility, based on rsync that I use as my personal backup tool.
I have started using rsnapshot after using rsync and rdiff-backup and lost files because of file corruption.
rsnapshot is a great backup utility because it hardlinks files if they already exists and your backups does not take much more space than the actual filesystem you are backing up.
You need to configure passwordless SSH connection from the backup server to the file server if you plan to run this as a automated job using crontab.

This is the content of my config file (/root/scripts/rsnapshot-home.conf) to backup my remote fileserver

config_version  1.2
snapshot_root   /media/Backup/
cmd_cp  /bin/cp
cmd_rm  /bin/rm
cmd_rsync       /usr/bin/rsync
cmd_ssh /usr/bin/ssh
cmd_logger      /usr/bin/logger
cmd_du  /usr/bin/du
interval        daily   7
interval        weekly  4
interval        monthly 3
verbose 2
loglevel        4
logfile /var/log/rsnapshot-home.log
exclude_file    /root/scripts/rsnapshot-home.exclude
rsync_long_args --delete        --numeric-ids   --delete-excluded
lockfile        /var/run/rsnapshot.pid
backup  username@example.com:/export/files/      files/

The config file is tab delimited so you will get errors if you use space instead!

Running manual daily backup can be done with the command

# rsnapshot -c /root/scripts/rsnapshot-home.conf daily

You do now have a folder structure like this with your backups

/media/Backup/daily.0/files
/media/Backup/daily.1/files
/media/Backup/daily.2/files
/media/Backup/daily.3/files
...

Where daily.0 is the newest backup.

The backup files are store in the same form as in your file server so you can browse them using a regular file browser.
You can read more about restoring backups on the rsnapshot HOWTO.

You can also configure a report to be sent after every backup with the perl script rsnapreport.pl but I will not be covering that in this post.

Tags: ,

Posted by

02 Aug 2012 Backup of Zimbra MailBox using zmmailbox

This is a short script I use to backup the Zimbra mailbox content for my users.
This has been used on a Zimbra Collaboration Server (ZCS Open Source Edition) 7.2 installation, but should work on earlier versions as well.
I use another script to backup the whole Zimbra installation, but that might be another blog post.

#!/bin/bash -x

# Backup of Zimbra mailboxes using zmmailbox
# Restore of mailbox should be performed using:
# /opt/zimbra/bin/zmmailbox -z -m user@host postRestURL -u https://HOST "//?fmt=tgz&resolve=skip" mailbox-name-date.tgz

BackupFolder="/backup/zimbra"
MailBox="user1 user2 user3 userN"
DateToday=`date -I`

for name in $MailBox
do
        sudo -u zimbra /opt/zimbra/bin/zmmailbox -z -m $name@pario.no getRestURL "//?fmt=tgz" > mailbox-$name-$DateToday.tgz
done

The backup files are named mailbox-user1-20120802.tgz mailbox-user2-20120802.tgz …

Tags: , , , ,

Posted by

01 Jun 2011 NetBackup 7.x port usage

If you are unsure what ports Symantec NetBackup 7.x master or media Windows server uses, just open the following file

%SYSTEMROOT%\system32\drivers\etc\services

The content in this file could be like this if you have not made any changes to the default configuration

bpcd		13782/tcp
bprd		13720/tcp
vnetd		13724/tcp
vopied		13783/tcp
bpdbm		13721/tcp
bpjobd		13723/tcp
bpjava-msvc		13722/tcp
NB_dbsrv		13785/tcp
vmd		13701/tcp
tldcd		13711/tcp
tl8cd		13705/tcp
tl4d		13713/tcp
tlmd		13716/tcp
tlhcd		13717/tcp
acsd		13702/tcp

Tags: , ,

Posted by