Install Poppins on Debian

Let’s install Poppins on the backup server and remote host, both Debian machines. For this example to work, let’s assume the host drizzle is defined in /etc/hosts.

Setup Backup Server

Install required packages:

root@umbrella ~ # apt-get install mercurial php5-cli rsync ssh grep gzip

Set the appropriate timezone in /etc/php5/cli/php.ini if required. For a full listing of available timezones, see http://php.net/manual/en/timezones.php. For example, we’ll set the timezone to Brussels:

date.timezone = Europe/Brussels

Download the source code from bitbucket:

root@umbrella ~ # hg clone https://bitbucket.org/poppins/poppins /opt/poppins

Make a link to init.php in /usr/local/bin:

root@umbrella ~ # ln -s /opt/poppins/init.php /usr/local/bin/poppins

Verify the installation:

root@umbrella ~ # poppins -v

Setup Remote Host

root@drizzle ~ # apt-get install rsync ssh grep aptitude

Setup Connection

Establish a passwordless ssh login:

root@umbrella ~ # ssh-keygen
root@umbrella ~ # ssh-copy-id drizzle

Configure Poppins

Create directories:

root@umbrella ~ # mkdir poppins.d
root@umbrella ~ # cd poppins.d
root@umbrella ~/poppins.d # mkdir logs conf backups

Copy the configuration template:

root@umbrella ~ # cp /opt/poppins/example.poppins.ini /root/poppins.d/conf/drizzle.poppins.ini

Edit the configuration file:

[local]
rootdir = "/root/poppins.d/backups"
logdir = "/root/poppins.d/logs"
hostdir-name = 'drizzle'
hostdir-create = yes
snapshot-backend = 'default'
[remote]
ssh = yes
retry-count = 0
retry-timeout = 5
host = 'drizzle'
user = 'root'
pre-backup-script = "";
pre-backup-onfail = "abort";
[included]
/ = 'root'
[excluded]
[snapshots]
incremental = 2
1-daily = 7
1-weekly = 4
1-monthly = 3
1-yearly = 1
[meta]
remote-disk-layout =  yes
remote-package-list =  yes
[log]
local-disk-usage =  yes
compress = yes
[rsync]
compresslevel = 0
hardlinks = no
verbose = yes
retry-count = 0
retry-timeout = 5
cross-filesystem-boundaries = no
[mysql]
enabled = no
configdirs = ''

Run the script

root@umbrella ~ # poppins -c /root/poppins.d/conf/drizzle.poppins.ini

Run as a cronjob

If you want to run Poppins in cron, make sure the path is set correctly, or use an absolute path:

1 1 * * * /usr/local/bin/poppins -c /root/poppins.d/conf/drizzle.poppins.ini
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s