# node-google-backup: Automated Local Backups for Google Mail, Calendar, and Contacts

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/weejewel-node-google-backup
Generated for open source discovery and AI-assisted research.

node-google-backup is a powerful command-line utility designed to automatically back up your Google Mail, Calendar, and Contacts to local files. This JavaScript-based tool ensures your critical data is safely stored offline, providing peace of mind against account lockouts or data loss. It efficiently syncs only new mails, contacts, and events, making subsequent backups quick and resource-friendly.

GitHub: https://github.com/WeeJeWel/node-google-backup
OSRepos URL: https://osrepos.com/repo/weejewel-node-google-backup

## Summary

node-google-backup is a powerful command-line utility designed to automatically back up your Google Mail, Calendar, and Contacts to local files. This JavaScript-based tool ensures your critical data is safely stored offline, providing peace of mind against account lockouts or data loss. It efficiently syncs only new mails, contacts, and events, making subsequent backups quick and resource-friendly.

## Topics

- JavaScript
- Google
- Backup
- CLI
- Mail
- Calendar
- Contacts
- Data Security

## Repository Information

Last analyzed by OSRepos: Sun Oct 12 2025 04:40:22 GMT+0100 (Western European Summer Time)
Detail views: 11
GitHub clicks: 10

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

`node-google-backup` is an efficient command-line utility developed by WeeJeWel, designed to automate the backup of your Google Mail, Calendar, and Contacts to local files. This JavaScript-based tool ensures your valuable data is securely stored offline, offering peace of mind against potential account lockouts or data loss. It intelligently syncs only new mails, contacts, and events, making subsequent backup operations fast and resource-efficient. With 408 stars and 16 forks, it's a well-regarded project licensed under GPL-3.0.

The utility creates a structured local directory, organizing your data into `Contacts` (VCF files), `Calendar` (ICS files), and `Mail` (EML files, categorized by ID, Thread, and Label).

## Installation

Before running `node-google-backup`, you need to create a Google App Password. This provides a secure way for the utility to access your Google services without using your main account password. You can generate one at [https://myaccount.google.com/apppasswords](https://myaccount.google.com/apppasswords){:target="_blank"}.

Once you have your App Password, you can run the utility using Node.js or Docker.

## Examples

### Node.js

If you have Node.js installed, you can execute the utility directly using `npx`:

bash
$ npx -y google-backup \
  --username "john.doe@gmail.com" \
  --password "abcd efgh ijkl mnop" \
  --filepath "~/Backups/Google/"


This command will download your Google data to the specified `filepath`. For automated backups, consider scheduling this command as a cron job.

### Docker

For those who prefer containerized environments, `node-google-backup` is also available as a Docker image:

bash
$ docker run \
  --env GOOGLE_BACKUP_USERNAME="john.doe@gmail.com" \
  --env GOOGLE_BACKUP_PASSWORD="abcd efgh ijkl mnop" \
  --env GOOGLE_BACKUP_FILEPATH="/backups" \
  --env GOOGLE_BACKUP_SERVICES="mail,calendar,contacts" \
  --volume="~/Backups/Google/:/backups/" \
  ghcr.io/weejewel/google-backup


This Docker command mounts a local directory to store the backups and uses environment variables for configuration.

## Why Use It?

While Google provides excellent services, there are numerous accounts of individuals being locked out of their accounts, leading to potential loss of critical personal data. `node-google-backup` addresses this concern by empowering you to maintain local copies of your Google Mail, Calendar, and Contacts. This ensures that you always have access to your data, regardless of your Google account status, providing an essential layer of personal data security and control.

## Links

*   **GitHub Repository:** [https://github.com/WeeJeWel/node-google-backup](https://github.com/WeeJeWel/node-google-backup){:target="_blank"}
*   **NPM Package:** [https://npmjs.com/package/google-backup](https://npmjs.com/package/google-backup){:target="_blank"}
*   **Create Google App Password:** [https://myaccount.google.com/apppasswords](https://myaccount.google.com/apppasswords){:target="_blank"}
*   **Related Project, iCloud Backup:** [https://github.com/WeeJeWel/node-icloud-backup](https://github.com/WeeJeWel/node-icloud-backup){:target="_blank"}