{"id":24869,"date":"2023-04-28T19:13:05","date_gmt":"2023-04-28T17:13:05","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=24869"},"modified":"2023-04-28T19:13:06","modified_gmt":"2023-04-28T17:13:06","slug":"redis-backup-and-restore-your-database","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/","title":{"rendered":"Redis : Backup and restore your database"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p><strong>Redis <\/strong>is a <strong>nosql <\/strong>database , a high performance key-value database management system that stores information in memory for fast access. It can be used to manage your users&#8217; sessions or your site&#8217;s cache, for example.<\/p>\n\n\n\n<p>In a previous a blog we have seen how to import a dataset or create one from you own .<\/p>\n\n\n\n<p>To perform this task , the best practice is to backup your current database in order to perform a rollback if you encounter some issue during your import.<\/p>\n\n\n\n<p>We will see how to perform that now!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Backup strategy <\/h2>\n\n\n\n<p>First of all let&#8217;s see how Redis writes DATA in the database:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Redis persistence<\/li>\n<\/ul>\n\n\n\n<p>Persistence refers to the writing of data to durable storage, such as HDD or SSD. <\/p>\n\n\n\n<p>Below you can find Redis  a range of persistence options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>RDB<\/strong> (Redis Database): RDB persistence performs point-in-time snapshots of your dataset at specified intervals.<\/li>\n\n\n\n<li><strong>AOF<\/strong> (Append Only File): AOF persistence logs every write operation received by the server. These operations can then be replayed again at server startup, reconstructing the original dataset. Commands are logged using the same format as the Redis protocol itself.<\/li>\n\n\n\n<li><strong>No persistence<\/strong>: You can disable persistence completely. This is sometimes used when caching.<\/li>\n\n\n\n<li><strong>RDB + AOF<\/strong>: You can also combine both AOF and RDB in the same instance.<\/li>\n<\/ul>\n\n\n\n<p><strong><span style=\"text-decoration: underline\">Note from Redis site:<\/span><\/strong><\/p>\n\n\n\n<p>If you&#8217;d rather not think about the tradeoffs between these different persistence strategies, you may want to consider <a href=\"https:\/\/docs.redis.com\/latest\/rs\/databases\/configure\/database-persistence\/\">Redis Enterprise&#8217;s persistence options<\/a>, which can be pre-configured using a UI.<\/p>\n\n\n\n<p>Will see in a incoming blog the advantage and disadvantage of each solution , for the moment we will focus  on how to backup and restore your db using a <strong>rdb <\/strong>file \ud83d\ude42 <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Backup your Redis database<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Locate your Redis Home folder<\/h3>\n\n\n\n<p>Before making your Database backup you have to locate your Redis home:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Start your Redis server:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"517\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25.png\" alt=\"\" class=\"wp-image-24871\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25.png 976w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25-300x159.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25-768x407.png 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use command to check if database is running:<\/li>\n<\/ul>\n\n\n\n<p><code>ps -eaf | grep redis<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"981\" height=\"150\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-26.png\" alt=\"\" class=\"wp-image-24872\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-26.png 981w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-26-300x46.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-26-768x117.png 768w\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <strong>Redis-cli<\/strong> utility<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>redis-cli<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"147\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-27.png\" alt=\"\" class=\"wp-image-24873\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-27.png 979w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-27-300x45.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-27-768x115.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the below command to get the home directory:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>127.0.0.1:6379&gt; config get dir<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"331\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/SAVE92refresh2.png\" alt=\"\" class=\"wp-image-24876\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/SAVE92refresh2.png 977w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/SAVE92refresh2-300x102.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/SAVE92refresh2-768x260.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Exit from Redis and go to the Home directory:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"368\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A2Capture-1024x368.png\" alt=\"\" class=\"wp-image-24877\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A2Capture-1024x368.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A2Capture-300x108.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A2Capture-768x276.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A2Capture.png 1027w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Locate your <strong>dump.rdb<\/strong> file<\/li>\n<\/ul>\n\n\n\n<p>You should find a <strong>dump.rdb<\/strong> file in the Redis home directory, it correspond to your database, so when you make a commit with your Redis commands it will write in this file .<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"207\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A3Capture-1024x207.png\" alt=\"\" class=\"wp-image-24878\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A3Capture-1024x207.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A3Capture-300x61.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A3Capture-768x155.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A3Capture.png 1030w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save your database<\/li>\n<\/ul>\n\n\n\n<p>To perform a backup of your database your must use the <strong>SAVE <\/strong>command (or <strong>BGSAVE<\/strong>) :<\/p>\n\n\n\n<p><strong><span style=\"text-decoration: underline\">From Redis site:<\/span><\/strong><\/p>\n\n\n\n<p>&#8220;The <strong><code>SAVE<\/code> <\/strong>commands performs a <strong>synchronous<\/strong> save of the dataset producing a <em>point in time<\/em> snapshot of all the data inside the Redis instance, in the form of an RDB file.<\/p>\n\n\n\n<p>You almost never want to call <strong><code>SAVE<\/code> <\/strong>in production environments where it will block all the other clients. Instead usually <a href=\"https:\/\/redis.io\/commands\/bgsave\"><code>BGSAVE<\/code><\/a> is used. However in case of issues preventing Redis to create the background saving child (for instance errors in the fork(2) system call), the <code>SAVE<\/code> command can be a good last resort to perform the dump of the latest dataset.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"209\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A4Capture-1024x209.png\" alt=\"\" class=\"wp-image-24879\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A4Capture-1024x209.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A4Capture-300x61.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A4Capture-768x157.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/A4Capture.png 1028w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can create a backup folder to store the old dump.rdb file you want , if you need to restore them or use it on another fresh Redis database.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"121\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-28.png\" alt=\"\" class=\"wp-image-24882\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-28.png 500w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-28-300x73.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Restore your Database<\/h2>\n\n\n\n<p>To restore your database you just need to substitute the <strong>dump.rdb<\/strong> file you made before with the current <strong>dump.rdb<\/strong> file in your Redis home <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Let&#8217;s simulate a data loss and make a restoration :<\/li>\n<\/ul>\n\n\n\n<p>We will remove our beloved Diego and Pele from the database<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"679\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z1Capture-1024x679.png\" alt=\"\" class=\"wp-image-24883\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z1Capture-1024x679.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z1Capture-300x199.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z1Capture-768x509.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z1Capture.png 1286w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Now these entries are no more here:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"597\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z2Capture-1024x597.png\" alt=\"\" class=\"wp-image-24884\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z2Capture-1024x597.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z2Capture-300x175.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z2Capture-768x448.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z2Capture.png 1287w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>As we have made a backup before that and we have stored it in our backup folder we will be able to restore these entries:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"433\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z3Capture-1024x433.png\" alt=\"\" class=\"wp-image-24885\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z3Capture-1024x433.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z3Capture-300x127.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z3Capture-768x325.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z3Capture.png 1028w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Before moving the backup to the Redis home we have to stop the Redis server:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"978\" height=\"691\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/sCapture.png\" alt=\"\" class=\"wp-image-24887\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/sCapture.png 978w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/sCapture-300x212.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/sCapture-768x543.png 768w\" sizes=\"auto, (max-width: 978px) 100vw, 978px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We can now move the <strong>dump.rdb<\/strong> file to the current Redis home directory <\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"551\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z4Capture-1024x551.png\" alt=\"\" class=\"wp-image-24888\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z4Capture-1024x551.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z4Capture-300x161.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z4Capture-768x413.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z4Capture.png 1026w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Now we just have to restart the Redis server and check if our 2 world cup legends are back<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"690\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z5Capturestart.png\" alt=\"\" class=\"wp-image-24889\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z5Capturestart.png 976w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z5Capturestart-300x212.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z5Capturestart-768x543.png 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check if data are recovered :<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z6Capturestart-1024x552.png\" alt=\"\" class=\"wp-image-24890\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z6Capturestart-1024x552.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z6Capturestart-300x162.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z6Capturestart-768x414.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/Z6Capturestart.png 1026w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>That&#8217;s it , we get our data back \ud83d\ude42<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion <\/h2>\n\n\n\n<p>You know now how to backup and restore your data on Redis , there is many ways to administrate your backups such as using a <strong>cron <\/strong>or by using  <strong>Snapshotting <\/strong>utility on Redis  , we will see that in a next Blog.<\/p>\n\n\n\n<p>For the moment feel free to check <a href=\"https:\/\/www.dbi-services.com\/blog\/author\/nabilsaoual\/\">my other blogs<\/a> and also the <a href=\"https:\/\/www.dbi-services.com\/blog\/\">dbi bloggers<\/a> to share knowledge and discover new features of your favorite soft<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Redis is a nosql database , a high performance key-value database management system that stores information in memory for fast access. It can be used to manage your users&#8217; sessions or your site&#8217;s cache, for example. In a previous a blog we have seen how to import a dataset or create one from you [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1739],"tags":[947],"type_dbi":[],"class_list":["post-24869","post","type-post","status-publish","format-standard","hentry","category-nosql","tag-nosql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Redis : Backup and restore your database - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Redis : Backup and restore your database\" \/>\n<meta property=\"og:description\" content=\"Introduction: Redis is a nosql database , a high performance key-value database management system that stores information in memory for fast access. It can be used to manage your users&#8217; sessions or your site&#8217;s cache, for example. In a previous a blog we have seen how to import a dataset or create one from you [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-28T17:13:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-28T17:13:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25.png\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\"},\"headline\":\"Redis : Backup and restore your database\",\"datePublished\":\"2023-04-28T17:13:05+00:00\",\"dateModified\":\"2023-04-28T17:13:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/\"},\"wordCount\":725,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/04\\\/image-25.png\",\"keywords\":[\"NoSQL\"],\"articleSection\":[\"NoSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/\",\"name\":\"Redis : Backup and restore your database - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/04\\\/image-25.png\",\"datePublished\":\"2023-04-28T17:13:05+00:00\",\"dateModified\":\"2023-04-28T17:13:06+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/04\\\/image-25.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/04\\\/image-25.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/redis-backup-and-restore-your-database\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Redis : Backup and restore your database\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d8563acfc6e604cce6507f45bac0ea1\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/middleware-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Redis : Backup and restore your database - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/","og_locale":"en_US","og_type":"article","og_title":"Redis : Backup and restore your database","og_description":"Introduction: Redis is a nosql database , a high performance key-value database management system that stores information in memory for fast access. It can be used to manage your users&#8217; sessions or your site&#8217;s cache, for example. In a previous a blog we have seen how to import a dataset or create one from you [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/","og_site_name":"dbi Blog","article_published_time":"2023-04-28T17:13:05+00:00","article_modified_time":"2023-04-28T17:13:06+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25.png","type":"","width":"","height":""}],"author":"Middleware Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"headline":"Redis : Backup and restore your database","datePublished":"2023-04-28T17:13:05+00:00","dateModified":"2023-04-28T17:13:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/"},"wordCount":725,"commentCount":2,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25.png","keywords":["NoSQL"],"articleSection":["NoSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/","url":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/","name":"Redis : Backup and restore your database - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25.png","datePublished":"2023-04-28T17:13:05+00:00","dateModified":"2023-04-28T17:13:06+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2023\/04\/image-25.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/redis-backup-and-restore-your-database\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Redis : Backup and restore your database"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/24869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=24869"}],"version-history":[{"count":8,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/24869\/revisions"}],"predecessor-version":[{"id":24894,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/24869\/revisions\/24894"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=24869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=24869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=24869"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=24869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}