backup.sh
287 Bytes
# Take backup of the strapi config
npm run strapi config:dump > "backup/strapi.tmp.config"
sed '1,4d' "backup/strapi.tmp.config" > "backup/strapi.config"
rm "backup/strapi.tmp.config"
# Take database backup.
pg_dump -h localhost -p 5432 -U harishpatel -F c -b -f "backup/pg.dump" offers