Automated n8n Workflow and Credential Backup to Git
detail.loadingPreview
Safeguard your n8n automation assets with this workflow that automatically exports your workflows and credentials, then commits and pushes them to a Git repository. Ensure your critical data is version-controlled and recoverable, offering peace of mind.
About This Workflow
Never worry about losing your valuable n8n workflows and credentials again. This powerful n8n workflow provides a robust, automated backup solution by leveraging Git for version control and secure storage. It regularly exports all your defined workflows and sensitive credentials, then intelligently commits these changes with a timestamp and pushes them to your designated Git repository. This ensures that every iteration of your automation logic and access keys is meticulously preserved, making disaster recovery, migration, or collaborative development efforts seamless and reliable. Set it and forget it, knowing your n8n instance is fully backed up.
Key Features
- Automated Scheduled Backups: Configure daily or hourly backups of your entire n8n instance to a Git repository.
- Comprehensive Data Export: Exports both your n8n workflows and all associated credentials, ensuring a complete snapshot.
- Git Version Control Integration: Leverage Git for detailed version history, easy rollbacks, and collaborative development.
- Manual Trigger Option: Initiate a backup instantly whenever needed with a single click.
- Timestamped Commits: Each backup is automatically committed with a unique timestamp for easy identification of restoration points.
How To Use
- Prepare your Git Repository: Create an empty Git repository (e.g., on GitHub, GitLab, Bitbucket) and clone it locally into a directory named
reporelative to where n8n can access it. - Ensure Git CLI Access: Make sure the
gitcommand-line tool is installed and accessible by the user running your n8n instance. - Install n8n CLI (if not already): The workflow uses
npx n8n exportcommands, so ensure the n8n CLI is available in your environment. - Configure Cron Trigger: Adjust the
Cronnode'striggerTimesparameter to match your desired backup frequency (e.g.,0, 6, 12, 18for every 6 hours). - Set Git Credentials: Ensure your n8n instance has the necessary permissions to
git pushto your remote repository (e.g., by configuring Git credentials or SSH keys for the user running n8n). - Activate the Workflow: Save and activate the workflow. It will now automatically back up your n8n data as scheduled, or you can trigger it manually.
Apps Used
Workflow JSON
{
"id": "6f79c07a-9a0e-4037-a10c-a7aa138072ef",
"name": "Automated n8n Workflow and Credential Backup to Git",
"nodes": 12,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 6f79c07a-9a0e...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Robust Concurrency Control for n8n Workflows with Redis
Prevent simultaneous execution of critical n8n workflows or tasks using a centralized, Redis-backed locking mechanism. This reusable utility workflow ensures data integrity and resource management by allowing other workflows to acquire, check, and release locks.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.