Giter Club home page Giter Club logo

ghost-backup's People

Contributors

bennetimo avatar kennethlimcp avatar rija avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ghost-backup's Issues

arm64 support

Hello,
Are you planning to release an arm64 (v8) release? :)
Thanks,

No default client exists in ghost

The documentation for setting up ghost-backup states that 2 default clients are created during initialization of ghost. ghost-backup and ghost-frontend. However, neither of those seem to exist and I don't even have a clients table in my sqlite database. Any idea how to manually create one? I see the following error because of this.

Thu Feb 13 16:48:46 UTC 2020: Checking if a mysql container exists on the network at mysql:3306
Thu Feb 13 16:48:46 UTC 2020:  ...no mysql container exists on the network. Using sqlite mode
Thu Feb 13 16:48:46 UTC 2020: creating backup: 20200213-1648...
Thu Feb 13 16:48:46 UTC 2020: backing up ghost database
Thu Feb 13 16:48:46 UTC 2020:  creating ghost db archive (sqlite)...
Thu Feb 13 16:48:46 UTC 2020:  ...completed: /backups/backup-db_20200213-1648.gz
Thu Feb 13 16:48:46 UTC 2020: backing up ghost content files
Thu Feb 13 16:48:46 UTC 2020:  creating ghost content files archive...
Thu Feb 13 16:48:47 UTC 2020:  ...completed: /backups/backup-ghost_20200213-1648.tar.gz
Thu Feb 13 16:48:47 UTC 2020: backing up ghost json file
Thu Feb 13 16:48:47 UTC 2020:  ...checking if a ghost container exists on the network at concision.us:443
Thu Feb 13 16:48:47 UTC 2020:  ...found ghost service on the network
Thu Feb 13 16:48:47 UTC 2020:  ...retrieving client secret for client: ghost-backup
Error: no such table: clients

Error 2059 during backup

What would be causing the ERROR 2059 during my backups? My dabs container is mysql:8.

Wed Mar 15 11:52:16 UTC 2023: Checking if a mysql container exists on the network at ghost_db:3306
Wed Mar 15 11:52:16 UTC 2023:  ...a mysql container exists on the network. Using mysql mode
Wed Mar 15 11:52:16 UTC 2023: creating backup: 20230315-1152...
Wed Mar 15 11:52:16 UTC 2023: backing up ghost database
Wed Mar 15 11:52:16 UTC 2023:  creating ghost db archive (mysql)...
mysqldump: Got error: 2059: "Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory" when trying to connect
Wed Mar 15 11:52:16 UTC 2023:  ...completed: /backups/backup-db_20230315-1152.gz
Wed Mar 15 11:52:16 UTC 2023: backing up ghost content files
Wed Mar 15 11:52:16 UTC 2023:  creating ghost content files archive...
Wed Mar 15 11:52:20 UTC 2023:  ...completed: /backups/backup-ghost_20230315-1152.tar.gz
Wed Mar 15 11:52:20 UTC 2023: backing up ghost json file
Wed Mar 15 11:52:20 UTC 2023:  ...checking if a ghost container exists on the network at ghost:2368
Wed Mar 15 11:52:20 UTC 2023:  ...found ghost service on the network
Wed Mar 15 11:52:20 UTC 2023:  ...retrieving client secret for client: ghost-backup
ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib/x86_64-linux-gnu/mariadb18/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

Issue with json backups

When I'm trying to use the JSON backup feature I am receiving this error:

docker exec backup backup -D -F -P
Wed Oct 23 19:00:38 UTC 2019: Checking if a mysql container exists on the network at mysql:3306
Wed Oct 23 19:00:38 UTC 2019:  ...no mysql container exists on the network. Using sqlite mode
Wed Oct 23 19:00:38 UTC 2019: -D set: excluding db archive in backup
Wed Oct 23 19:00:38 UTC 2019: -F set: excluding ghost files archive in backup
Wed Oct 23 19:00:38 UTC 2019: -p set: not purging old backups (limit is set to 1000)
Wed Oct 23 19:00:38 UTC 2019: creating backup: 20191023-1900...
Wed Oct 23 19:00:38 UTC 2019: backing up ghost database
Wed Oct 23 19:00:38 UTC 2019:  ...skipped
Wed Oct 23 19:00:38 UTC 2019: backing up ghost content files
Wed Oct 23 19:00:38 UTC 2019:  ...skipped
Wed Oct 23 19:00:38 UTC 2019: backing up ghost json file
Wed Oct 23 19:00:38 UTC 2019:  ...checking if a ghost container exists on the network at my-ghost-url:443
Wed Oct 23 19:00:38 UTC 2019:  ...found ghost service on the network
Wed Oct 23 19:00:38 UTC 2019:  ...retrieving client secret for client: ghost-backup
Wed Oct 23 19:00:38 UTC 2019:  ...retrieved client secret: 12345 for client slug: ghost-backup
parse error: Invalid numeric literal at EOF at line 1, column 3

Any idea why this would happen?

Docker-compose looks like this

    blog:
      image: ghost:alpine
      container_name: blog
      restart: always
      ports:
        - 2368:2368
      volumes:
        - './blog/content:/var/lib/ghost/content'
      environment:
        mail__transport: "SMTP"
        mail__options__service: "Mailgun"
        mail__options__auth__user: ${MAILGUN_USER}
        mail__options__auth__pass: ${MAILGUN_PASS}
        url: 'https://my-url.com'
      labels:
        - "traefik.enable=true"
        - "traefik.basic.frontend.rule=Host:blog.${website}"
        - "traefik.basic.port=2368"
        - "traefik.basic.protocol=http"
      networks:
        - http_network

    backup:
      image: bennetimo/ghost-backup:1.25
      container_name: backup
      restart: always
      volumes:
        - './blog/content:/var/lib/ghost/content'
        - '/mnt/google-drive/blog/backups:/backups'
        - './backuplogs:/backuplogs'
      environment:
        - "BACKUP_LOCATION=/backups"
        - "BACKUP_TIME=0 2 * * *"
        - "BACKUPS_RETAIN_LIMIT=1000"
        - "GHOST_SERVICE_NAME=blog.my-url.com"
        - "GHOST_SERVICE_PORT=443"
        - "GHOST_SERVICE_USER_EMAIL=my.email%40gmail.com"
        - "GHOST_SERVICE_WORKER_PASSWORD=12345&8731"
        - "LOG_LOCATION=/backuplogs/ghost-backup.log"
        - "BACKUP_FILE_PREFIX=myblog"

arm/v7 support

Hello,
I'm using ghost for my blog and would be very interested to use this docker image. Do you think it would be possible to make it available for linux/arm/v7 arch.
I'm a linux sysadmin and would be very happy to try and debug, if needed, this feature. This feature would add support for Raspberry PI hardware, and Turris Omnia witch is an Open Hardware router for example (I use both).
https://www.turris.com/en/omnia/overview/
Sorry if that's not the proper way to make this kind of request I'm not very familiar with github :)

config location issue when using official Ghost Docker image

Hi

I like this project, I find it useful and well designed. I wanted to use it with the Ghost's official Alpine-based Docker image but I ran into the issue below while testing the interactive restore.

Select DB or Ghost archive file to restore, or 'q' to quit
1) /backups/backup-db_20180731-1049.gz
2) /backups/backup-ghost_20180731-1049.tar.gz
Restore #: 1
Tue Jul 31 10:54:41 UTC 2018: restoring data from sqlite dump file: /backups/backup-db_20180731-1049.gz
Tue Jul 31 10:54:42 UTC 2018: ...restored ghost DB archive /backups/backup-db_20180731-1049.gz
Tue Jul 31 10:54:42 UTC 2018: restore complete
Restore #: 2
Tue Jul 31 10:54:47 UTC 2018: removing ghost files in /var/lib/ghost/content
rm: cannot remove '/var/lib/ghost/content/config.js': No such file or directory

It turns out that ghost-backup and Ghost for Docker have different understanding about location and name of config files:

  • Ghost installs the config files in /var/lib/ghost/ as config.production.json while the rest of the files are installed under /var/lib/ghost/content
  • ghost-backup expects all files and config.js to be under $GHOST_LOCATION

I guess Ghost has changed a lot over the last couple of years.
I'll try to come up with a fix and contribute a PR.

Help needed

I have a docker running ghost on oracle ARM and I tried to use ghost-backup:4 (it seems this is for ARM).

I attached to ghost-backup container's bash and ran backup. This showed up:

Mon Feb  6 12:53:43 UTC 2023: Checking if a mysql container exists on the network at mysql:3306
Mon Feb  6 12:53:43 UTC 2023:  ...a mysql container exists on the network. Using mysql mode
Mon Feb  6 12:53:43 UTC 2023:  ...Retrieving ghost session cookie for user [email protected]
Createdgrep: /tmp/ghost-cookie.txt: No such file or directory
Mon Feb  6 12:53:43 UTC 2023: Error: Unable to create a admin session cookie. Check all your credentials are correct
Mon Feb  6 12:53:43 UTC 2023: Finished: FAILURE

then I tried to unset env variables

root@318b14996138:/usr/app# unset GHOST_SERVICE_USER_EMAIL
root@318b14996138:/usr/app# unset GHOST_SERVICE_USER_PASSWORD

and this showed up.

Mon Feb  6 12:57:21 UTC 2023: Checking if a mysql container exists on the network at mysql:3306
Mon Feb  6 12:57:21 UTC 2023:  ...a mysql container exists on the network. Using mysql mode
Mon Feb  6 12:57:21 UTC 2023:  ...Retrieving ghost session cookie for user
{"errors":[{"message":"Access Denied.","context":null,"type":"UnauthorizedError","details":null,"property":null,"help":null,"code":null,"id":"cb5681e0-a61d-11ed-ad08-5f68ce151e92","ghostErrorCode":null}]}grep: /tmp/ghost-cookie.txt: No such file or directory
Mon Feb  6 12:57:21 UTC 2023: Error: Unable to create a admin session cookie. Check all your credentials are correct
Mon Feb  6 12:57:21 UTC 2023: Finished: FAILURE

I double and triple checked MYSQL database name, user, password. I even tried to use root and root password. None of that can get me through.

Please advise. Thanks!

Leo

createGhostAdminCookie() is called even when using the -J option to disable JSON export backup

Hi @bennetimo,

Using bennetimo/ghost-backup:4, I'd like to use the -J option to just perform database and content backup, but when I do so, backup still wants to create the cookie file.

Cookie creation doesn't really work on my setup (localhost) anyways, and because of the mantadory call to createGhostAdminCookie(), I cannot even bypass it with the -J option.

As I believe that function is only used for the JSON export file, isn't it probably better to call createGhostAdminCookie() only in the parts of the backup.sh and restore.sh scripts that need it?

Problems with Urls after restoring from backup

Hi Bennetimo,

first of all, thanks for your great work on this docker image. I have enjoyed using it so far :)

Just as a test, I'm trying to restore a ghost 2.25.4 backup using ghost-backup. Most things worked out of the box, but somehow the urls to the images are off.

Do you maybe have experience with such problems?

I've noticed that you have labeled the image 1.25 - is the ghost version I am using (2.25.4) maybe not supported by ghost-backup?

Thanks & Cheers,
Alon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.