Archived post by mattiasmalmer

here goes…

it creates a subdirectory named backup. saves a copy of your scene there named currentscenename_backup_timestamp.hip

then it does that every ten minutes.

and after it has written ten files it deletes the first one. so you have rolling loop of ten backup files. (to ensure your server is not full of files over night haha)

you can change update interval and number of stored backups really easily by just modifying the py file.

this in my opinion is how auto backup SHOULD work.

now it would be neat if it did not save files if the scene is unmodified. so that it does not make a lot of unneccessary saves. but I can live with that for now.

now this code is written by an idiot and chatGPT so do not blame me if it paperclips your machine

no more stupid overwriting of the original scene file. no broken links to caches from changes in filenames. just a straight backup if shit hits the fan.

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20230112/24/23/456.py