Skip to content

Custom GitHub Action to create backups on your Pterodactyl server!

License

Notifications You must be signed in to change notification settings

MAXOUXAX/pterodactyl-create-backup-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pterodactyl Backup Manager

CI Lint CodeQL

🚀 Overview

The Pterodactyl Backup Manager GitHub Action creates a backup on the Pterodactyl panel with automatic rotation. This action ensures that your server backups are always up-to-date and old backups are rotated out to save space.

📋 Inputs

  • panel-url (required): The URL of the Pterodactyl panel.
  • server-id (required): The ID of the server to backup.
  • api-key (required): The Pterodactyl API key.
  • headers (optional): Extra headers as a JSON object or as lines formatted like Header: Value.

📤 Outputs

  • backup-uuid: The UUID of the created backup.

⚙️ Usage

To use this action, create a workflow YAML file in your repository's .github/workflows directory. Here is an example:

name: Create Pterodactyl Backup

on:
  schedule:
    - cron: '0 0 * * *' # Runs daily at midnight

jobs:
  backup:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Create Pterodactyl Backup
        uses: maxouxax/pterodactyl-create-backup-action@v1
        with:
          panel-url: ${{ secrets.PANEL_URL }}
          server-id: ${{ secrets.SERVER_ID }}
          api-key: ${{ secrets.API_KEY }}

      - name: Create Pterodactyl Backup (Cloudflare Access)
        uses: maxouxax/pterodactyl-create-backup-action@v1
        with:
          panel-url: ${{ secrets.PANEL_URL }}
          server-id: ${{ secrets.SERVER_ID }}
          api-key: ${{ secrets.API_KEY }}
          headers: |
            CF-Access-Client-Id: ${{ secrets.CF_ACCESS_CLIENT_ID }}
            CF-Access-Client-Secret: ${{ secrets.CF_ACCESS_CLIENT_SECRET }}

📝 Notes

Note: Ensure that you store sensitive information such as panel-url, server-id, and api-key in GitHub Secrets to keep them secure.

⚠️ Warnings

Warning: This action will delete the oldest backup if the backup limit is reached. Make sure you have configured your backup limits appropriately on the Pterodactyl panel.

🛠️ Development

To develop and test this action locally, you can use the following commands:

# Install dependencies
npm install

# Run the action locally
npm run local-action

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


For more information, visit the Pterodactyl documentation.

About

Custom GitHub Action to create backups on your Pterodactyl server!

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors