You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<imgalt="GitHub release (latest by date including pre-releases)"src="https://img.shields.io/github/v/release/py-package/masonite-backup?include_prereleases">
New to Masonite ? Please first read the [Official Documentation](https://docs.masoniteproject.com/).
32
-
Masonite strives to have extremely comprehensive documentation 😃. It would be wise to go through the tutorials there.
33
-
If you find any discrepencies or anything that doesn't make sense, be sure to comment directly on the documentation to start a discussion!
24
+
-[x] Backup Database
25
+
-[x] Backup Files
26
+
-[x] Store Backup Locally in the filesystem
27
+
-[ ] Send Backup Notifications
28
+
-[ ] Email Backup
29
+
-[ ] Store Backup in other Masonite Supported Storage Drivers [s3]
34
30
35
-
Have questions or want to talk? Be sure to join the [Masonite Discord Community](https://discord.gg/TwKeFahmPZ)!
36
31
37
-
## Installation
32
+
###Installation
38
33
39
34
```bash
40
35
pip install masonite-backup
41
36
```
42
37
43
-
## Configuration
38
+
###Configuration
44
39
45
40
Add BackupProvider to your project in `config/providers.py`:
46
41
@@ -64,17 +59,54 @@ Then you can publish the package resources (if needed) by doing:
64
59
python craft package:publish backup
65
60
```
66
61
67
-
## Usage
62
+
### Usage
63
+
64
+
Once you publish the package resources, you can use the `backup` command to backup your database and files. Before that if you want to configure options of backup then you can do that by updating `config/backup.py` configuration file.
65
+
66
+
```python
67
+
# config/backup.py
68
+
69
+
FILENAME="backup"
70
+
DIRECTORY="backup"
71
+
SOURCE= {
72
+
"root": base_path(),
73
+
"excludes": [
74
+
".git",
75
+
"storage",
76
+
"venv",
77
+
"node_modules",
78
+
"__pycache__",
79
+
# add more...
80
+
],
81
+
}
82
+
```
83
+
84
+
**Backup Database and Files**
85
+
86
+
```bash
87
+
python craft backup:run
88
+
```
89
+
90
+
**Backup Database Only**
91
+
92
+
```bash
93
+
python craft backup:run --only-db
94
+
```
95
+
96
+
**Backup Files Only**
97
+
98
+
```bash
99
+
python craft backup:run --only-files
100
+
```
68
101
69
-
_Explain how to use your package_
70
102
71
103
## Contributing
72
104
73
105
Please read the [Contributing Documentation](CONTRIBUTING.md) here.
0 commit comments