-
Notifications
You must be signed in to change notification settings - Fork 70
Feat: Update Features Backup & Restore #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Update Features Backup & Restore #12
Conversation
…d detailed results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a comprehensive backup and restore feature for the nginx-love application with full SSL certificate support. The implementation enables complete migration of configurations between servers while preserving all critical data including SSL certificate files and private keys.
- Adds complete backup/restore functionality with SSL certificate file support
- Implements scheduled backup management with manual backup execution
- Creates comprehensive documentation guide for backup operations with security considerations
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/BACKUP_SSL_GUIDE.md | Comprehensive guide documenting backup/restore features with SSL support and security best practices |
| apps/web/src/services/backup.service.ts | Frontend service layer for backup API operations with complete type definitions |
| apps/web/src/components/pages/Backup.tsx | Enhanced backup UI with drag-and-drop import, confirmation dialogs, and real-time status updates |
| apps/api/src/routes/index.ts | Registers backup routes in the main router |
| apps/api/src/routes/backup.routes.ts | Complete REST API routing for backup operations with proper authorization |
| apps/api/src/controllers/backup.controller.ts | Comprehensive backup controller with SSL file handling, nginx config management, and data restoration |
| apps/api/prisma/schema.prisma | Database schema for backup schedules and file management |
| apps/api/prisma/migrations/20251006033542_add_backup_feature/migration.sql | Database migration creating backup tables and enums |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -1,5 +1,4 @@ | |||
| import { useState } from "react"; | |||
| import { useTranslation } from "react-i18next"; | |||
| import { useState, useEffect } from "react"; | |||
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import statement removed useTranslation but the related import import { useTranslation } from 'react-i18next'; was also removed. Consider whether internationalization support should be maintained for this feature.
| }); | ||
|
|
||
| if (existingUser) { | ||
| logger.info(`User ${userData.username} already exists, skipping`); |
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User restoration creates users with a placeholder password and inactive status, but the logging reveals information about existing users. Consider using a more generic log message that doesn't expose user existence for security reasons.
| logger.info(`User ${userData.username} already exists, skipping`); | |
| logger.info('User skipped during restoration (may already exist)'); |
| const { password, ...userWithoutPassword } = u; | ||
| return userWithoutPassword; |
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While passwords are excluded from backup export, consider also excluding other sensitive fields like reset tokens, session data, or any authentication-related metadata that might be stored in the user record.
| const { password, ...userWithoutPassword } = u; | |
| return userWithoutPassword; | |
| // Exclude sensitive fields from user export | |
| // Add/remove fields as appropriate for your user schema | |
| const { | |
| password, | |
| resetToken, | |
| resetTokenExpiry, | |
| sessionToken, | |
| mfaSecret, | |
| ...userWithoutSensitive | |
| } = u; | |
| return userWithoutSensitive; |
…with hashed passwords from backup
|
* Feat: Update Features Backup & Restore (#12) * feat: Update Features Backup & Restore * Feat: Slave Mode (#13) * feat: Update Features Backup & Restore * Feat: Features update (#14) * feat: Update software * Features update version and update noti Change Password (#15) * feat: Update Features Backup & Restore * Fix frontend error (#16) * Refactor services to use centralized API module and token storage * Feat: Enhance Slave Mode UI with mode switch button and update node mode mutation * feat: Improve SSLDialog layout with enhanced text wrapping for certificate fields * refactor: replace js-cookie with localStorage for token management (#17) * feat: add syncInterval and lastSyncHash columns to system_configs table (#18) * feat: Update project goal description and remove security recommendation * feat: Update project goal description and remove security recommendation * About readme (#21) * feat: Update project goal description and remove security recommendation * Refactor be (#22) * Refactor code structure for improved readability and maintainability * style: limit max height of certificate, private key, and chain input fields (#23) --------- Co-authored-by: SangND <dacsang97@gmail.com>




No description provided.