Backup Ghost Database Periodically
Page content
This ghost-backup container will backup in every 3am
Start ghost-backup container
cychong@mini1:~/Documents/docker-daily-backup$ docker run --name ghost-backup -d -v /home/cychong/Documents/docker-daily-backup:/backups --volumes-from 388c84247267 bennetimo/ghost-backup
ea33f148122bbe0d90a502bfd884e4c988e9f8837921f725ca7317afff7fa149
Instant backup
cychong@mini1:~/Documents/docker-daily-backup$ ls -al
total 8
drwxrwxr-x 2 cychong cychong 4096 Mar 3 23:25 .
drwxr-xr-x 5 cychong cychong 4096 Mar 3 23:25 ..
cychong@mini1:~/Documents/docker-daily-backup$ docker exec ghost-backup backup
Tue Mar 3 14:27:27 UTC 2020: Checking if a mysql container exists on the network at mysql:3306
Tue Mar 3 14:27:33 UTC 2020: ...no mysql container exists on the network. Using sqlite mode
Tue Mar 3 14:27:33 UTC 2020: creating backup: 20200303-1427...
Tue Mar 3 14:27:33 UTC 2020: backing up ghost database
Tue Mar 3 14:27:33 UTC 2020: creating ghost db archive (sqlite)...
Tue Mar 3 14:27:33 UTC 2020: ...completed: /backups/backup-db_20200303-1427.gz
Tue Mar 3 14:27:33 UTC 2020: backing up ghost content files
Tue Mar 3 14:27:33 UTC 2020: creating ghost content files archive...
Tue Mar 3 14:27:40 UTC 2020: ...completed: /backups/backup-ghost_20200303-1427.tar.gz
Tue Mar 3 14:27:40 UTC 2020: backing up ghost json file
Tue Mar 3 14:27:40 UTC 2020: ...checking if a ghost container exists on the network at ghost:2368
Tue Mar 3 14:27:41 UTC 2020: ...no ghost service found on the network
Tue Mar 3 14:27:41 UTC 2020: ...skipping: Your ghost service was not found on the network. Configure GHOST_SERVICE_NAME and GHOST_SERVICE_PORT
Tue Mar 3 14:27:41 UTC 2020: purging old backups (set to retain the most recent 30)
Tue Mar 3 14:27:41 UTC 2020: ...found 1 database files (purging 0)
Tue Mar 3 14:27:41 UTC 2020: ...found 1 ghost content archive files (purging 0)
Tue Mar 3 14:27:41 UTC 2020: ...found 0 ghost json files (purging 0)
Tue Mar 3 14:27:41 UTC 2020: completed backup to /backups
Check backup output
cychong@mini1:~/Documents/docker-daily-backup$ ls -al
total 67236
drwxrwxr-x 2 cychong cychong 4096 Mar 3 23:27 .
drwxr-xr-x 5 cychong cychong 4096 Mar 3 23:25 ..
-rw-r--r-- 1 root root 1829326 Mar 3 23:27 backup-db_20200303-1427.gz
-rw-r--r-- 1 root root 67004766 Mar 3 23:27 backup-ghost_20200303-1427.tar.gz