Commit 0d5c5f1f by Harish Patel

made provision for backup and restore

1 parent 993b64bd
# 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
\ No newline at end of file \ No newline at end of file
No preview for this file type
strapi config:restore < "backup/strapi.config"
pg_restore -h localhost -p 5432 -U harishpatel -d offers -v "backup/pg.dump"
\ No newline at end of file \ No newline at end of file
{
"kind": "singleType",
"collectionName": "company_informations",
"info": {
"singularName": "company-information",
"pluralName": "company-informations",
"displayName": "Company Information",
"description": ""
},
"options": {
"draftAndPublish": false
},
"pluginOptions": {},
"attributes": {
"companyEmail": {
"type": "string",
"required": true
},
"companyContactNumber": {
"type": "string"
},
"facebookPage": {
"type": "text"
},
"twitterPage": {
"type": "text"
},
"youtubePage": {
"type": "text"
},
"instagramPage": {
"type": "text"
},
"linkedinPage": {
"type": "text"
},
"logo": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [
"images"
]
}
}
}
'use strict';
/**
* company-information controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::company-information.company-information');
'use strict';
/**
* company-information router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::company-information.company-information');
'use strict';
/**
* company-information service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::company-information.company-information');
{
"kind": "singleType",
"collectionName": "cp_connect_pages",
"info": {
"singularName": "cp-connect-page",
"pluralName": "cp-connect-pages",
"displayName": "Cp Connect Page"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"banner": {
"allowedTypes": [
"images"
],
"type": "media",
"multiple": false,
"required": true
},
"content": {
"type": "richtext",
"required": true
},
"disclaimer": {
"type": "richtext",
"required": true
}
}
}
'use strict';
/**
* cp-connect-page controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::cp-connect-page.cp-connect-page');
'use strict';
/**
* cp-connect-page router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::cp-connect-page.cp-connect-page');
'use strict';
/**
* cp-connect-page service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::cp-connect-page.cp-connect-page');
{
"kind": "collectionType",
"collectionName": "menu_items",
"info": {
"singularName": "menu-item",
"pluralName": "menu-items",
"displayName": "Menu Item",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"label": {
"type": "string",
"required": true
},
"url": {
"type": "string",
"required": true
},
"children": {
"type": "relation",
"relation": "oneToMany",
"target": "api::menu-item.menu-item",
"mappedBy": "parent"
},
"parent": {
"type": "relation",
"relation": "manyToOne",
"target": "api::menu-item.menu-item",
"inversedBy": "children"
},
"menu": {
"type": "relation",
"relation": "manyToOne",
"target": "api::menu.menu",
"inversedBy": "menuItems"
},
"serialNumber": {
"type": "integer",
"required": true
}
}
}
'use strict';
/**
* menu-item controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::menu-item.menu-item');
'use strict';
/**
* menu-item router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::menu-item.menu-item');
'use strict';
/**
* menu-item service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::menu-item.menu-item');
{
"kind": "collectionType",
"collectionName": "menus",
"info": {
"singularName": "menu",
"pluralName": "menus",
"displayName": "Menu"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"name": {
"type": "string",
"required": true,
"unique": true
},
"menuItems": {
"type": "relation",
"relation": "oneToMany",
"target": "api::menu-item.menu-item",
"mappedBy": "menu"
}
}
}
'use strict';
/**
* menu controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::menu.menu');
'use strict';
/**
* menu router
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::menu.menu');
'use strict';
/**
* menu service
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::menu.menu');
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!