diff --git a/.forgejo/workflows/backup-to-s3.yml b/.forgejo/workflows/backup-to-s3.yml deleted file mode 100644 index 665ce68..0000000 --- a/.forgejo/workflows/backup-to-s3.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Scheduled S3 Code Backup -on: - schedule: - # This cron expression means "At minute 0 past every 3rd hour" - - cron: '0 */3 * * *' - # It's also helpful to include workflow_dispatch so you can trigger it manually if needed - workflow_dispatch: -jobs: - backup-code: - runs-on: ubuntu-latest - container: node:22 - steps: - - name: Checkout Code - uses: actions/checkout@v3 - - name: Install AWS CLI - run: | - apt-get update && apt-get install -y awscli - - name: Sync entire repository to S3 Backup Bucket - run: | - aws s3 sync . s3://forgeocodespace --delete diff --git a/installation.sh b/installation.sh new file mode 100644 index 0000000..5b8561f --- /dev/null +++ b/installation.sh @@ -0,0 +1,4 @@ +curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" +sudo apt install -y unzip +unzip -o awscliv2.zip +sudo ./aws/install --update \ No newline at end of file diff --git a/syncscript.sh b/syncscript.sh new file mode 100644 index 0000000..68c64a3 --- /dev/null +++ b/syncscript.sh @@ -0,0 +1 @@ +sudo aws s3 sync /var/lib/docker/volumes/forgeo_forgejo-data/_data/git/repositories/vignesh s3://forgeocodespace --delete --region ap-south-2 \ No newline at end of file