{"_id":"spotify-url-resolvers","name":"spotify-url-resolvers","dist-tags":{"latest":"3.4.2"},"versions":{"3.4.2":{"name":"spotify-url-resolvers","version":"3.4.2","description":"Automated server backup tool with Telegram delivery","main":"index.js","bin":{"tg-backup":"bin/cli.js"},"scripts":{"start":"node index.js","setup":"node bin/setup.js"},"dependencies":{"telegraf":"^4.16.3","archiver":"^7.0.1","dotenv":"^16.4.5","chalk":"^4.1.2","ora":"^5.4.1","inquirer":"^8.2.6","node-cron":"^3.0.3"},"engines":{"node":">=16.0.0"},"keywords":["backup","telegram","server","automation"],"license":"MIT","_id":"spotify-url-resolvers@3.4.2","_nodeVersion":"14.21.3","_npmVersion":"7.17.0","dist":{"integrity":"sha512-T/i6+ChHhMtWjydlKZiyTrQiBGKwQYGKpYMBXH6b/UeOs5jNly0FTeGde0+Z/YAisvPhiqNNm+YMdDX4+NPvxg==","shasum":"ec29ffe92bb0d7e678720ba5ceaa6140c0beb9f3","tarball":"https://registry.npmjs.org/spotify-url-resolvers/-/spotify-url-resolvers-3.4.2.tgz","fileCount":9,"unpackedSize":11144,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQChb7LgyXI/bOoVJB0AWvk6sQjzRRJ17kTtUM+0Uje6igIgZ0k+u4Rf49zK9Qh+dBYopoz8ailiFXuwRN3LsZqv/ns="}]},"_npmUser":{"name":"magrh","email":"ropro8777@gmail.com"},"directories":{},"maintainers":[{"name":"magrh","email":"ropro8777@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/spotify-url-resolvers_3.4.2_1787667043414_0.8368530920462285"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-25T14:10:43.356Z","3.4.2":"2026-08-25T14:10:43.575Z","modified":"2026-08-25T14:10:43.771Z"},"maintainers":[{"name":"magrh","email":"ropro8777@gmail.com"}],"description":"Automated server backup tool with Telegram delivery","keywords":["backup","telegram","server","automation"],"license":"MIT","readme":"# 📦 tg-backup\n\n> Automated server backup tool – compresses your project files and delivers the zip straight to your Telegram channel or chat.\n\n---\n\n## Features\n\n- ✅ Creates a compressed `.zip` of your entire project\n- ✅ Automatically **excludes** `node_modules`, `.git`, and existing archives (`.zip`, `.rar`, `.tar`, `.7z`)\n- ✅ Sends the backup directly to your **Telegram channel** via bot\n- ✅ Interactive **setup wizard** (`tg-backup setup`)\n- ✅ Optional **cron scheduling** (run once or on a recurring schedule)\n- ✅ Auto-deletes local zip after successful upload (configurable)\n- ✅ Standalone – no framework integration needed\n\n---\n\n## Quick Start\n\n### 1. Install\n\n```bash\n# Option A – install globally from npm (once published)\nnpm install -g tg-backup\n\n# Option B – clone and link locally\ngit clone https://github.com/yourname/tg-backup.git\ncd tg-backup\nnpm install\nnpm link\n```\n\n### 2. Run the setup wizard\n\n```bash\ntg-backup setup\n```\n\nThis will ask for your bot token, chat ID, paths, and schedule – then write a `.env` file for you.\n\n### 3. Run a backup\n\n```bash\ntg-backup\n# or\ntg-backup run\n```\n\n---\n\n## Manual Configuration\n\nCopy `.env.example` to `.env` and fill in your values:\n\n```bash\ncp .env.example .env\nnano .env\n```\n\n| Variable            | Required | Default              | Description                                         |\n|---------------------|----------|----------------------|-----------------------------------------------------|\n| `TG_BOT_TOKEN`      | ✅ Yes   | –                    | Bot token from [@BotFather](https://t.me/BotFather) |\n| `TG_CHAT_ID`        | ✅ Yes   | –                    | Channel or chat numeric ID (e.g. `-1001234567890`)  |\n| `SOURCE_DIR`        | No       | current directory    | Directory to archive                                |\n| `OUTPUT_DIR`        | No       | `./backups`          | Where to store the zip before uploading             |\n| `BACKUP_PREFIX`     | No       | `backup`             | Prefix for the zip filename                         |\n| `EXCLUDE_PATTERNS`  | No       | see below            | Pipe-separated glob patterns to skip                |\n| `DELETE_AFTER_SEND` | No       | `true`               | Delete local zip after successful upload            |\n| `CRON_SCHEDULE`     | No       | *(empty = run once)* | Standard cron expression for recurring backups      |\n\n### Default exclusions\n\n```\nnode_modules | *.zip | *.rar | *.tar | *.tar.gz | *.7z | .git\n```\n\nYou can override this completely with the `EXCLUDE_PATTERNS` variable.\n\n---\n\n## Getting your Telegram Chat ID\n\n1. Add your bot to the channel as an **administrator**.\n2. Send any message to the channel.\n3. Visit:\n   ```\n   https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates\n   ```\n4. Look for `\"chat\": { \"id\": -1001234567890 }` in the response.\n\n---\n\n## Cron Schedule Examples\n\n| Expression      | Meaning               |\n|-----------------|-----------------------|\n| `0 2 * * *`     | Every day at 2 AM     |\n| `0 */6 * * *`   | Every 6 hours         |\n| `0 3 * * 0`     | Every Sunday at 3 AM  |\n| `*/30 * * * *`  | Every 30 minutes      |\n\n---\n\n## CLI Reference\n\n```\ntg-backup [run]    Run a backup now (default)\ntg-backup setup    Interactive setup wizard\ntg-backup --help\ntg-backup --version\n```\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-846dad6cfee14697a24d7fac79abf012"}