ops_backups 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6162626296f9b33f706c46ad74419d1580deb96117cc6cfb994c1cab6606517e
4
- data.tar.gz: aa24b48098a259532ccb7f46aa103d0103b358b0c488d6d19c9b1e87f9a357e7
3
+ metadata.gz: 9c5630e25e938e9e3ff8df947ec38c0135b12a2d94b3a46e9c6d55d3b70f5a0c
4
+ data.tar.gz: 8bb0cab72c776e01cda428050591c97658de1401cf3420b7bde758ace3b44c06
5
5
  SHA512:
6
- metadata.gz: fd70dada6f380d7ec9a841a1b8d1b021cffe3531bf1766db1527acebc2b92bdba8e46fc7f9cfd71fd6826bd43a41a4c3a33981453571f8f6a338bad4930234e4
7
- data.tar.gz: 20e4668207a653ce6c3b2a48c8dd1a752cf305701b45c5f68dcf0d3609ec3018d79f71516d50616a3d2fea7f180620907f522350481f82f23156d8df0c9780ad
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).
@@ -1,4 +1,4 @@
1
- class CreateOpsBackups < ActiveRecord::Migration[8.0]
1
+ class CreateOpsBackups < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
  # check if the table already exists
4
4
  return if table_exists?(:ops_backups)
@@ -1,3 +1,3 @@
1
1
  module OpsBackups
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
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.8
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-23 00:00:00.000000000 Z
11
+ date: 2024-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails