Chris Croft's picture

I am having a issue with the backup of my LAMP instance. I run the 'tklbam-backup' command from SSH console and exists with 'Killed' statement (see below for ouput). The web management console backup section show the inital back as in progress but will never complete. 

I have tried deleting this backup and running the command again but I always get the same error.

Can anyone help me get my backs to work correctly.

root@lamp ~# tklbam-backup
warning: old backup record deleted, creating new ...
Creating /TKLBAM (contains backup metadata and database dumps)
==============================================================

  mkdir -p /TKLBAM
  mkdir /TKLBAM/etc

// needed to automatically detect and fix file ownership issues

  cp /etc/passwd /TKLBAM/etc
  cp /etc/group /TKLBAM/etc

Comparing current system state to the base state in the backup profile
----------------------------------------------------------------------

Save list of new packages:

  cat > /TKLBAM/newpkgs << EOF
  autoconf automake autotools-dev binutils cpp cpp-4.7 ebsmount ec2metadata fontconfig-config ftp gcc gcc-4.7 hubclient imagemagick-common libc-dev-bin libc6-dev libffi5 libfile-copy-recursive-perl libfontconfig1 libgd2-xpm libglib2.0-0 libgomp1 libice6 libitm1 libjasper1 libjbig0 libjpeg8 liblcms2-2 liblqr-1-0 libmagickcore5 libmagickwand5 libmpc2 libmpfr4 libpng12-0 libquadmath0 libsm6 libssl-dev libtiff4 libtool libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxpm4 libxt6 linux-libc-dev m4 php5-curl php5-dev php5-gd php5-imagick php5-xmlrpc proftpd-basic python-amqplib python-anyjson python-carrot shtool tklamq update-inetd webmin-proftpd x11-common zip zlib1g-dev
  EOF

Killed

Forum: 
Chris Croft's picture

Can anyone help me with this issue?

Liraz Siri's picture

Does it have a swap partition? I can't think of any other reason that TKLBAM would die in the middle of the backup process. Run this command and post the output:

# free

Anyhow, if you manage to reproduce this problem on an EC2 instance I might be able to log in and take a look. Otherwise your guess is as good as mine.

Chris Croft's picture

Here is the output

             total       used       free     shared    buffers     cached
Mem:        611064     494944     116120          0      26156     116120
-/+ buffers/cache:     352668     258396
Swap:            0          0          0

 

Liraz Siri's picture

As I suspected it looks like you're running our of memory. I suggest you add a swap partition, then try again and report back!

Chris Croft's picture

I maded a swap file of 1GB in size. I ran the backup and it took longer but it returned the message 'Killed'.

Do I need to mak a bigger swap file?

 

 

Jeremy Davis's picture

Probably worth a shot... Although I'm not 100% sure if that'll fix it, although the fact that it took longer before it died with a 1GB swap makes me think that if you make it bigger we might be in with a chance... You haven't really got a lot to lose by giving it a go! :)
Liraz Siri's picture

That's very strange. TKLBAM shouldn't need that much memory. Are you trying to backup an unusually large filesystem?

Chris Croft's picture

We are using this as a staging enviorment for our customers websites. They are build with Joomla and each site have approx 6000 files, with currently 12 site on this enviorment, this makes 72000 files + the lamp file system.

Liraz Siri's picture

TKLBAM builds up a list of files and their properties in memory.

Options:

  1. Add more RAM
  2. Rewrite the algorithm it uses to use less memory. It's open source.
  3. Break up the backup into pieces (e.g., one backup with a separate TKLBAM_REGISTRY for each customer). See the FAQ for details.

Add new comment