简体   繁体   中英

Backup ActiveStorage images in PostgreSQL rails

I am trying to make a backup in the database with active storage, but I do not know where the images are stored. I did a pg_dump but I only got the data from the tables. Do you know how I could do it?

I am using a local ubuntu 18 lts server with postgresql to store the images.

There are implementations of ActiveStorage::Service that save the image data directly to the database.

Here's one such implementation. https://github.com/lsylvester/active_storage-postgresql

Usually not a good idea to store lots of binary in an RDBMS. However, if it's relatively few and simplifies your architecture, it may make sense.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM