TurnKey Linux Virtual Appliance Library

TKLBAM restore error: Duplicity complaining about "too many open files"

liraz's picture
A user contacted me over e-mail with a problem he was having with TKLBAM and I'm posting the answer to the forums in case it happens to anyone else. In general support issues are best asked here on the support forum. That way if anyone else runs into an issue and we find a solution they can benefit from the answer.

Very long backup chains consisting of hundreds or thousands of incremental backups are problematic. Even when everything works they're inefficient. So if you backup very frequently (e.g., hourly cron job) we recommend changing the full backup frequency configured in /etc/tklbam/conf from 1M (one month) to 1W (one week) or below.

Otherwise you're going to get very long backup chains (720 volumes in a month) and may run into file descriptor limits on your system when you restore.

If you've already created such a backup, you can temporarily increase the file descriptor limit from 1024 to 65536 like this:

ulimit -n 65536
tklbam-restore 1

Keith Wu's picture

Hourly backup settings

I like to change the backup to be hourly, but i got an error when configuring to run hourly.

Tip: configure daily automatic backups

chmod +x /etc/cron.daily/tklbam-backup


To configure hourly backup, i am thinking to run the command below and wondering if there is anything else that i need.

chmod +x /etc/cron.hourly/tklbam-backup

Liraz Siri's picture

An hourly cron job doesn't exist by default

But you can move the daily cron job to get it to work:
mv /etc/cron.daily/tklbam-backup /etc/cron.hourly
chmod +x /etc/cron.hourly/tklbam-backup
Also, remember to reconfigure the full backup frequency to 1W (one week).
Guest's picture

configuration for tklbam-backup -2 hour inc backup

trying to configure inc backup to be 2h.

edit the file config file to be the following:

tklbam-backup -quite 2h

then init the hourly job again.

chmod +x /etc/cron.hourly/tklbam-backup

Please advise.

Keith Wu's picture

clear current backups and reinit

i have some backup file accumulating, how can i clear them and reinit tklbam-backup with the new settings.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)