Flame Archiving Tools (incl. nightly backups)

I wanted to share some tools that I had written while back at Glassworks that I’ve since re-worked for my own personal needs now that I’ve become a freelancer. From what I can tell, quite a few shops I’ve worked with don’t have any type of automatic, nightly archiving in place so I’ve realized that by sharing this, perhaps that will change since I think it really ought to be.

Nightly Archiving
Download here
This consists of two parts. First, a python hook to keep a log of what projects (+ Flame version) have been launched that day for each machine. Second, a python script that takes that log and deals with the archiving itself.

This is a bare-bones archive meant for emergencies. Nothing is cached, no timeline renders, motion vectors, etc. Just the metadata, setups and any flame created media. If you’re working fully unmanaged, they’re super quick and small.

To be clear, it’s really just meant as an oh shit backup and not for a final archive.

Project and Clip Library Backup
Download here
Two different shell scripts that backup /opt/Autodesk/clip/stonefs & /opt/Autodesk/project.

It’s a rolling back-up system so it’ll keep however many days you wish to retain. It uses the --link-dest flag in rsync to create hardlinks for any files that already exist which reduces storage requirements.

Read the instructions on Github and it’ll explain how to set everything up and run them. Hope it helps those people and shops that haven’t explored automating these types of backups. I know a lot of you already have this but for those that don’t…

Obvisouly, adding all these to your crontab means you can set it and forget and sleep well knowing that your projects are being backed-up without you havng to think about it.

Cheers!

15 Likes

I have a very similar set of scripts. I’ll compare them and see if I have anything good to add to the process/conversation.

1 Like

Nice one. Like I said, I assume many people here already have something like this rolled out. My aim is to help show others how simple it can be with the hope that the concept gets adopted by more shops.

Gave it a try and got an error trying to launch Nightly_archive.
Line 65, in flame_running_ps_count = subprocess.check_output(flame_running_check, shell=True, texte=True)
File “/usr/lib64/python3.6/subprocess.py”, line 356, in check_output

**kwargs).stdout

File “/usr/lib64/python3.6/subprocess.py”, line 423, in run

with Popen(*popenargs, **kwargs) as process:

TypeError: _init_() got an unexpected keyword argument ‘text’

Linux? I’ve only had access to MacOS recently and it’s working there.

Yep Linux, and unfortunately, i’m not really a “power user” Just managing the usual tasks so I’m stuck there.

It has to do with the differences between Python 3.6 & 3.7. I’ve pushed an update to Github that should work with your version of Python. Give it a go and let me know if it works (or doesn’t).

I’ll do that right away and let you know…

No more error. But still, it just ends up saying “No project to backup”. Will try to figure it out

You also need to install the hook mentioned in the readme. That keeps a log of the projects that have been opened since the last time the archiving script has been run. The idea is only projects that been opened are archived.

I did of course and it works. I mean it creates a log file in which A can see the projects I opened.

And le Nightly_archives I think is reading it. At least I gave it the path

Ok, my bad. A little “s” sneaked into a folder name… sorry for that.

So everything is working now?

Works well when manually launched so I added the scripts to my crontab for tonight and I’ll check tomorrow if it all went ok. It should!

1 Like

Worked great. Thx a lot!!

My pleasure!