|
1 | 1 | # Backup |
2 | 2 |
|
3 | | -Welcome to the Backup Addon! This addon supercharges your Statamic experience by providing powerful backup management capabilities. Say goodbye to data loss worries and hello to peace of mind! |
| 3 | +Backup is an extensible and powerful backup tool for statamic sites, it enables you to create, manage and schedule backups of your site with ease in the control panel. |
4 | 4 |
|
5 | 5 | ## Table of Contents |
6 | 6 |
|
7 | 7 | - [Features](#features) |
8 | 8 | - [Installation](#installation) |
9 | 9 | - [Configuration](#configuration) |
10 | 10 | - [Usage](#usage) |
11 | | -- [Contributing](#contributing) |
| 11 | + - [Scheduling](#scheduling) |
| 12 | +- [Documentation](#documentation) |
12 | 13 | - [License](#license) |
13 | 14 |
|
14 | 15 | ## Features |
15 | 16 |
|
16 | | -- 📂 **Customizable Storage**: Choose where your backups are stored, whether it's on your local disk or a different storage provider. |
17 | | -- 🔄 **Backup Rotation**: Automatically manage your backups by setting a maximum number to keep. Old backups are deleted to make room for new ones. |
18 | | -- 🔒 **Password Protection**: Keep your backups secure with an optional password. No unauthorized access allowed! |
19 | | -- ⏰ **Scheduled Backups**: Set it and forget it! Schedule backups to run automatically at your preferred frequency. |
| 17 | +Why use our backup addon? |
20 | 18 |
|
21 | | -## Installation |
22 | | - |
23 | | -To install this addon, follow these simple steps: |
| 19 | +- Control panel page where you can manage backups |
| 20 | +- Chunked uploads - upload huge backups from other servers without the need to change your `php.ini`. |
| 21 | +- Permissions - choose exactly which users can manage your backups with [permissions](https://statamic.dev/users#permissions). |
| 22 | +- Choose exactly what you want to backup by configuring the backup [pipeline](docs/pipeline.md). |
| 23 | + - Easy to extend and customize, [just create a new pipes](docs/pipeline.md#creating-a-new-backup-pipe)! |
| 24 | +- Uses laravels [storage system](https://laravel.com/docs/11.x/filesystem) and thus supports external storage out of the box. |
| 25 | +- Tested, we have over 140 assertions in this addon. |
24 | 26 |
|
25 | | -1. **Composer Installation**: |
| 27 | +## Installation |
26 | 28 |
|
27 | | - Run the following composer command in your Statamic project: |
| 29 | +1. To install this addon, require it using composer. |
28 | 30 |
|
29 | 31 | ```bash |
30 | 32 | composer require itiden/statamic-backup |
31 | 33 | ``` |
32 | 34 |
|
33 | | -2. **Configuration**: |
34 | | - |
35 | | - Publish the configuration file: |
36 | | - |
37 | | - ```sh |
| 35 | +2. Set the `content_path` config value to the path of your content, start with publishing the config: |
| 36 | + ```bash |
38 | 37 | php artisan vendor:publish --tag="backup-config" |
39 | 38 | ``` |
| 39 | + default is `storage_path('content')` |
40 | 40 |
|
41 | | - Next, configure the addon by editing the `config/backup.php` file. Customize settings such as content path, backup destination, and more. |
42 | | - |
43 | | - Read the full configuration documentation [here](docs/configuration.md)! |
44 | | - |
45 | | -3. **Usage**: |
46 | | - |
47 | | - You're all set! Start using the addon to handle your backups effortlessly. |
48 | | - |
49 | | -## Commands |
50 | | - |
51 | | -Backup your site: |
52 | | - |
53 | | -```sh |
54 | | -php artisan statamic:backup |
55 | | -``` |
| 41 | +## Configuration |
56 | 42 |
|
57 | | -Restore your site from an absolute path |
| 43 | +You can configure the backup settings in the `config/backup.php` file, first publish the configuration file using the following command: |
58 | 44 |
|
59 | | -```sh |
60 | | -php artisan statamic:backup:restore {path} |
| 45 | +```bash |
| 46 | +php artisan vendor:publish --tag="backup-config" |
61 | 47 | ``` |
62 | 48 |
|
63 | | -Clear the temp file directory |
64 | | - |
65 | | -```sh |
66 | | -php artisan statamic:backup:clear |
67 | | -``` |
| 49 | +Then you can configure: |
68 | 50 |
|
69 | | -## Configuration |
| 51 | +- Backup path |
| 52 | +- Backup disk |
| 53 | +- Backup filename |
| 54 | +- Backup schedule |
| 55 | +- Temporary files path |
| 56 | +- Max amount of backups to keep |
| 57 | +- Backup password |
| 58 | +- The Backup pipeline |
70 | 59 |
|
71 | | -Read the configuration [docs](docs/configuration.md)! |
| 60 | +Read more about the configuration [here](docs/configuration.md)! |
72 | 61 |
|
73 | | -## Notifications/Events |
| 62 | +## Usage |
74 | 63 |
|
75 | | -You can send notifications when a backup is created. Read the notifications [docs](docs/notifications.md)! |
| 64 | +To create a backup, navigate to the Backup section in the control panel and click the "Create Backup" button. There you can also see a list of all your backups and download or restore them if needed. |
76 | 65 |
|
77 | | -## Usage |
| 66 | +Or if you prefer to use the command line, you can use the following command: |
78 | 67 |
|
79 | | -Using the Statamic Backup Addon is a breeze: |
| 68 | +```bash |
| 69 | +php artisan statamic:backup:create |
| 70 | +``` |
80 | 71 |
|
81 | | -1. Configure your backup settings in `config/backup.php` to match your needs [[docs]](docs/configuration.md). |
| 72 | +### Scheduling |
82 | 73 |
|
83 | | -2. Run the backup command manually or let scheduled backups take care of it automatically. |
| 74 | +Configure the backup schedule in the configuration file, read more about it [here](docs/scheduling.md). |
84 | 75 |
|
85 | | -3. Enjoy the peace of mind knowing your data is backed up, secure, and accessible when you need it. |
| 76 | +To use the scheduling you need to run the laravel scheduler. Read more about that here: [Running the scheduler](https://laravel.com/docs/10.x/scheduling#running-the-scheduler). |
86 | 77 |
|
87 | | -## Contributing |
| 78 | +## Documentation |
88 | 79 |
|
89 | | -We welcome contributions from the Statamic community! Whether it's bug fixes, new features, or improvements, please feel free to contribute. |
| 80 | +In the docs directory you can read more about the pipeline, scheduling and notification configurations. |
90 | 81 |
|
91 | 82 | ## License |
92 | 83 |
|
93 | | -This addon is open-source and available under the [MIT License](LICENSE). |
| 84 | +Backup is open-sourced software licensed under the [MIT license](LICENSE.md). |
0 commit comments