ops_backups 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +24 -1
- data/db/migrate/20241114173612_create_ops_backups.rb +1 -1
- data/lib/ops_backups/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c5630e25e938e9e3ff8df947ec38c0135b12a2d94b3a46e9c6d55d3b70f5a0c
|
4
|
+
data.tar.gz: 8bb0cab72c776e01cda428050591c97658de1401cf3420b7bde758ace3b44c06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c06a9d87783b4950fac61f6e60f75d67288cff322d47bf953a1ffd33c7cbf71972b1b24cff28bd5310e0f9d92e4ebd1fa5280ab97a4ff8f37f43ffbf99f2d00
|
7
|
+
data.tar.gz: 357728c90e376f3101b07f948d2a28b379f453ddc8cd8aa7d0e29009e83506a4a8bc7c2ae0d3aeb47038f18fa31d305398b4cf4291ac1d6698c49c0178286b03
|
data/README.md
CHANGED
@@ -14,6 +14,30 @@ bundle add ops_backups
|
|
14
14
|
rails generate ops_backups:install
|
15
15
|
```
|
16
16
|
|
17
|
+
# Scripts
|
18
|
+
|
19
|
+
`pgdb` is a script that can be used to backup and restore a postgres database and wraps pg_dump and pg_restore in the context of [Kamal](https://kamal-deploy.org/) for ease of use. Environment here coresponds to the destination in Kamal.
|
20
|
+
|
21
|
+
```
|
22
|
+
Usage: pgdb <command> <environment> [<additional_args>]
|
23
|
+
|
24
|
+
Available commands:
|
25
|
+
console <environment> - Opens a database console for the specified environment.
|
26
|
+
create <environment> - Creates a new database for the specified environment.
|
27
|
+
revert <environment> <backup_db_name> - Reverts the database to a specified backup.
|
28
|
+
backup <environment> - Creates a clone of the remote database as a backup on the server.
|
29
|
+
backup:local <environment> - Backs up the remote database to a local dump file.
|
30
|
+
drop <environment> - Drops the database of the specified environment after confirmation.
|
31
|
+
pull <environment|url> [local_db_name] - Pulls the remote database to a local database with an optional custom name (optional).
|
32
|
+
push <environment> <local_db_name> - Pushes a local database to the remote environment, creating a backup of the remote.
|
33
|
+
rename <environment> [new_db_name] - Renames the main database of the specified environment, optionally using a new name (optional).
|
34
|
+
copy <source_env> <target_env> - Copies a database from one environment to another, with backup of the target database.
|
35
|
+
list <environment> - Lists databases for the base URL associated with the environment.
|
36
|
+
|
37
|
+
set EXCLUDE_TABLE_DATA to exclude data from specific tables on export
|
38
|
+
e.g. EXCLUDE_TABLE_DATA=versions bin/pgdb pull staging
|
39
|
+
```
|
40
|
+
|
17
41
|
# ActiveAdmin Integration
|
18
42
|
|
19
43
|
If you are using ActiveAdmin, you can manage your backups through the admin interface. The generator rails generate ops_backups:activeadmin will create the necessary example configuration.
|
@@ -30,6 +54,5 @@ rails generate ops_backups:activeadmin
|
|
30
54
|
- Create Unversioned Backup: Create a new unversioned backup, excluding specific tables.
|
31
55
|
|
32
56
|
|
33
|
-
|
34
57
|
## License
|
35
58
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/ops_backups/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ops_backups
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Koen Handekyn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|