We all know that archiving sucks.
But it would be great if we could have automatic archives that just happen at night while we sleep?
I made this little python tool that id like to share for anyone that cares , you will have to modify some lines to make it work for your paths
It will use NO license as achiving can be done without a license, which is great.
What it does:
It goes into /opt/Autodesk/project/ and checks each file in each project folder for a change , if it wasnt changed after last archive its skipped.
then it tries to do a archive without media/caches e.t.c - if the resulting archive is bigger than 20GB its skipped as that means some artists made some error by using managed media which is forbidden , thus the project gets added to the log called “Shame on you”
It will then delete all old archives except for the last 2
Obvisouly feel free to adjust the code to your business logic.
Enjoy ! hope it helps someone,!
Step1)
Put script anywhere it makes sense to you
step2) change the following
-
SSH Connection details, put in the SSH details (ip/user/password) of a machine thats running flame or the project server
-
Change script dir to where the script is, has to be accesible by the machine doing the archiving.
-
change all the paths to where you want the archives written to, again as this runs on the machine that has the flame projects it needs to be accessible by it!
Personally i just have my utility linux server run this script as a cronjob at 2AM every day and connect to my project server, and bobs my uncle.
0 2 * * * /usr/bin/python3 autobackup_public.py >> ~/cronjob_archive_auto.log 2>&1
auto_archive_public.py (12.4 KB)