Automation library · Integrations

Back up Linux server directories to Google Drive with Borg

Started by someone submitting a form, and works across Google Drive and n8n data table. 20 steps, 2 branches: a working afternoon to understand properly.

Medium

20 stepsMedium: a working afternoon
2Branches: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 2Logic 5Service 13

The steps in the order they run, from what starts it.

  1. 1Schedule TriggerSchedule triggerStarts it
  2. 2Get Backup SettingsForm triggerStarts it
  3. 3Get ConfigData TableService
  4. 4Init Backup Config TableData TableService
  5. 5Install Borg on ServerSshService
  6. 6Build Initial ConfigCodeLogic
  7. 7Build Runtime ConfigCodeLogic
  8. 8Store Borg Passphrase on ServerSshService
  9. 9Create Server BackupSshService
  10. 10Save ConfigData TableService
  11. 11Export Backup ArchiveSshService
  12. 12Download Backup ArchiveSshService
  13. 13Existing File InfoCodeLogic
  14. 14Find Existing FileGoogle DriveService
  15. 15Check Drive Mode for SyncIfLogic
  16. 16Check If Existing File FoundIfLogic
  17. 17Upload New Backup File (Versioned)Google DriveService
  18. 18Update Existing Backup File (Sync)Google DriveService
  19. 19Upload New Backup File (Sync)Google DriveService
  20. 20Cleanup: Remove Local Backup FileSshService

How it's built

Starts on
Someone submitting a form
Steps
20, with 2 branches
Size
Medium: a working afternoon
Connects to
Google Drive, n8n data table
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Google Drive account. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone submitting a form.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Plan an afternoon. 20 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 20 steps before you point it at anything that matters.