Creating automatic backups in Ardour

  • Posted on: 23 May 2018
  • By: agittins

Ardour is an amazing piece of software, but sometimes it still crashes. This is not entirely its own fault - plugins have to run in the same process so ultimately Ardour has no control over some of the code it ends up running. I find it pretty stable, but when you are syncing it with MuseScore and/or video things get a bit twitchy.

Of course, we all know to save early, save often - but when you're in the creative flow it's easy to lose track of time and not save for quite some time.

Ardour has an auto-save feature (Edit, Preferences, General, Session, Session Management, "Make periodic backups of the session file") but I find this sub-optimal for my use case for two reasons:

  • I'd like a handful of backups available, rather than just one
  • I find that these backups don't seem to happen very reliably - they don't happen while you have record-arm engaged, and I suspect they don't always happen under other circumstances, too.

Anyway, Ardour has an AWESOME feature - scripting. So I wrote a script that every minute saves a snapshot of the session, named <session-name>.autosave-N.ardour - where 'N' is between 0 and 4.

You can download the script from my github repository.

  • Save the script into (you might need to create the scripts directory):
    • (linux) ~/.config/ardour5/scripts/
    • (windows) %localappdata%\ardour5\scripts
    • (mac) $HOME/Library/Preferences/Ardour5/scripts
  • Then in Ardour, go to Edit, Lua Scripts, and choose Script Manager.
  • On the "Action Hooks" tab, click "New Hook"
  • Choose "[AJG] Autosave". If it's not there try the "Refresh" button.

This will add the script to your session, and it will start doing the autosaves within about 20 seconds, and every minute thereafter.

Now if your session crashes, you can choose one of the autosaves from the "Recent Sessions" list (click the little arrow to open up the list of snapshots for that session).

Note that this only applies per-session. So you'll have to remember to add the script to every session where you want this to happen. You can create a template for your new sessions (well worth doing anyway!) and include it in that, then you'll have it included any time you start a new session from that template.


Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.