Tutorial - Scripted Backup

Rev 1.002, 2022.11.17

How to read this tutorial

Summary

This tutorial is targeting organisations that has on-prem or cloud project storage, typically a file server with an attached RAID disk system.


Wishing to:


This tutorial is a complete walkthrough covering:


Notes: 


Source code downloadable here:

Schematics

Installing and configuring accsyn on/prem or cloud


The following guide is a short summary of the installation process described in detail here: accsyn Admin Manual


You now possess a fully functional file sharing service that can act as an replacement for example a FTP server.


Installing accsyn on a remote site/location

Next, we are going to setup the remote backup site. In this tutorial we are going to name it "backup" and we assume you have prepared a local Linux server with proxy storage mounted at same path as main server (/projects):


You now have a fully working setup were you can manually push files to backup sites, we are now going to set up automatic backup through a Python script.

Preparing Python on server


Install Python


In this tutorial, we run the script with Python 3. Python 2 can be used aswell.


Install accsyn Python API and dependencies



Getting boilerplate backup script


We provide a boilerplate Python 3 script at our GitHub: https://github.com/accsyn/scripted-backup. Download it and place locally, assuming your username is "admin": "C:\Users\Admin\Documents\backup.py". 

 

Configure backup script

This part requires you have some basic understanding of the Python language.


Modifying script to your needs



Create a launcher


The accsyn Python API requires authentication, save a file "backup.bat" alongside Python script with following content (entries in bold to be changed):


set ACCSYN_DOMAIN=company

set ACCSYN_API_USER=admin@company.com

set ACCSYN_API_KEY=57c0e2de-de50-4115-afda-348dfb4462c7

 <path to Python 3 install location>\python c:\Users\Admin\Documents\backup.py


Hints: 


Test the backup script


We are now ready to test if the backup script works as expected: 

Configure script to run regularly


Schedule backup


To enable automatic backup every night, we configure the Windows server to execute our backup script each day at midnight:



Remove scheduled backup




Conclusion

Using accsyn for backups is an effective way of running project backups, utilising the full network bandwidth with full encryption. With the possibility for users to restore lost files by themselves, you as an administrator is relieved of additional daily duties.


Automated backup job setups are often forgotten and if they stop work, you might miss out on it. With accsyn, you get Email notifications and can easily logon using the mobile friendly web application to verify that backup has executed.