HowTo: Automatically backup Ardour projects to a remote server

As a sensitive and educated user, I didn't want to loose days of work due to a computer failure (disk crash, hardware dying, etc...), so I decided to automate zipping and uploading my ardour project files (*.ardour) to a remote server using secure copy (scp) over SSH and a small bash script.

Since I'm also keeping a TODO list and a notes textfile (TODO.txt, notes.txt), I add them to the project archive, too.

Of course, the audio data is not backuped, but that doesn't really matter too much, since it doesn't change anymore after recording sessions are finished, and of course I've backuped to another disk already (which you should also, always do).

After each mixing session, I simply run the following bash script:


#!/bin/bash

USERNAME= # username of remote ssh host to upload the back to
SSH_HOST= # This can also be the name of an ssh profile
SSH_PORT= # Port of SSH on the remote host
ARDOUR_PROJECT_DIR= # The folder where your ardour projects are located

TIMESTAMP=`date +%Y%m%d-%H%M`
TAR="tar -cjvf"
FILENAME="$TIMESTAMP-ardour_projects.tar.bz2"

# Find all ardour project files and add them to a tar.bz2 archive - including TODO file and notes:
find $ARDOUR_PROJECT_DIR -type f \( -name "*.ardour" -o -name "*.history" \) | $TAR $FILENAME $ARDOUR_PROJECT_DIR/TODO.txt $ARDOUR_PROJECT_DIR/notes.txt -T -
# Optional: Optimized gzip archive for rsync transfer:
# gzip -9 --rsyncable $FILENAME
scp -P $SSH_PORT $FILENAME $USERNAME@$SSH_HOST:$ARDOUR_PROJECT_DIR

[]

Reply

CAPTCHA
Human?
         _____   _____             
| _ | | _ |
__ __ \ V / \ V / _ __ ___
\ \/ / / _ \ / _ \ | '_ ` _ \
> < | |_| | | |_| | | | | | | |
/_/\_\ \_____/ \_____/ |_| |_| |_|

Enter the code depicted in ASCII art style.