Questions for faster backing up

From time to time I copy the sessions I’ve been working on to an external hard drive, sometimes this can be time consuming and I am wondering if it’s necessary to copy everything every time. Let’s keep aside the case when something new has been recorded, then I just go on and copy the whole folder, but what if I have just been editing or mixing, are there a couple of key files that I can overwrite in two seconds and have it done?

If you are on linux, you can recursively copy the contents of a directory at the command prompt using

cp -r

with an additional ‘-u’ switch to only overwrite a file if the source is more recent or the file does not exist in the destination. So if your project structure remains the same between updates this might work for you e.g.

cp -vru source destination

but test it on unimportant data or a scratch project first, use at your own risk and always make sure you have more than one backup of important data. If your project is significantly large, maybe you could make a full backup at intervals, and just update with the changes in between - so if the worst happens, or something goes wrong, you haven’t lost all of your changes. The general rule for all backups is “backups never fail, but restores quite often do…” :slight_smile:

Editing in Ardour is non destructive. Audio-files, once recorded (or imported) never change, so in case you are editing or mixing, only the *ardour session file changes.

In addition to that there may be some plugin-state files and perhaps MIDI files which can change. but all those files are small.

Assuming you want to create a backup, and then update the existing backup on the external disk, I highly recommend rsync, that works cross-platform and can detect incremental changes.

On GNU/Linux or macOS:

rsync -Pa /path/to/the-Session  /media/backup-disk/ardour-sessions/

PS. Mind the trailing slash for the target folder in above command – alternatively the following are equivalent:

rsync -Pa /path/to/the-Session  /media/backup-disk/ardour-sessions/the-Session
rsync -Pa /path/to/the-Session/  /media/backup-disk/ardour-sessions/the-Session/

Or (2), assuming you want to create a full backup every time. That’s possible using hard-links of the previously copied files on the target disk, but I’m not aware of any tool that does this out of the box.

You could look into solutions in use by data-centers that do few hourly, daily and weekly snapshots of hard-disks. I have no idea how fast those are with slow disks, but I expect that since they’re also incremental it may help in your case.

In any case git would be my go-to solution for ardour sessions.
You can either only create a bare repo on the backup-disk or use git-annex for the audio-files (to prevent large files from taking up twice the disk-space).

I’m not sure exactly what you mean by backup, but I do like an use the Snapshot (and keep working on current version) ... feature (Shift+Ctrl+S) to quickly make a “backup” of the state of a project (just the mixing elements, not any new audio/midi material) into a new .ardour file. This gives me peace of mind that I can easily go back to a certain point in time and continue from there if I mess something up in a major way or I’m tying out an idea that may or may not work.

For ‘real’ backups, all I can really recommend is tarsnap: http://www.tarsnap.com/ - a bit of setup but almost complete peace of mind. I would write a little script to backup the files (with tarsnap) and then bind that to a keychord (the WM of your choice should be able to do so).

Backintime (on Linux) does incremental backups with hard links. It has also a gtx and qt graphical interface, in addition to the command line.

You could make a backup-profile for your music directory (or even just for a single session) and let it run at fixed times via cron/anacron (configuration in the GUI) or (but I have personally never tried this one) every time an external disc get connected. YMMV

1 Like

Thank you all for your answers, these backups I make are meant to save my ass in case my laptop goes kaput. I think what I came looking for was Robin’s confirmation that being Ardour non destructive most times I could get away by just copying the ardour session file.

I’d rather not to mess around much with command line, I feel a primitive relief watching the thing being dragged and copied in the external drive, but I’ll probably take a look to rsync.

Thanks!

My understanding is that is true only for audio files, MIDI files will be immediately written by changes in the editor. There was a post by Robin about it not long ago, I think.

For my studio computer I just use rsync to a USB external drive.
I copy my entire /home directory.
Using the -au flags, rsync only copies what’s changed, so a new recording will backup audio files, but after an editing session only the .ardour file and some small data files will have changed and the backup won’t take long.
There’s only one generation of backup, but it’s all the files, and restoring is a simply matter of copying the files.
For my office desktop, https://www.borgbackup.org/ which does deduplication, encryption, compression and multiple generations (daily/weekly/monthly) - all the same things tarsnap does, but I get to choose my backup server.

1 Like