{"id":2344,"date":"2026-11-23T22:06:02","date_gmt":"2026-11-23T22:06:02","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2344"},"modified":"2026-11-23T22:06:02","modified_gmt":"2026-11-23T22:06:02","slug":"test-your-shell-scripting-skills-program-12","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/test-your-shell-scripting-skills-program-12\/","title":{"rendered":"Shell Bash Scripting: Assignment &#038; Excercise &#8211; 7"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This exercise uses Bash, <code>rsync<\/code> and SSH to copy a local file to a remote backup server, then sends an email when the copy finishes. Below the original script you will find an explanation of each line, the setup it needs, an improved version that checks whether the backup actually worked, and steps to schedule it with cron.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Write a Shell Bash Script for backup a local file into a remote server<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<script src=\"https:\/\/gist.github.com\/devops-school\/4133f8d1748c0793b05fa05e29f32e00.js\"><\/script>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">How the example script works<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The script above does two things. It uses <code>rsync<\/code> over SSH to copy <code>\/path\/to\/yourfile<\/code> into the <code>\/backup\/<\/code> directory on <code>backupserver.com<\/code>. Then it pipes a one-line message into <code>mail<\/code> to send a &quot;backup complete&quot; email.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Part<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td><code>-a<\/code><\/td><td>Archive mode. Copies recursively and keeps permissions, timestamps, symlinks, owner and group (owner and group are only kept when the receiving side runs as root).<\/td><\/tr><tr><td><code>-v<\/code><\/td><td>Verbose. Lists each file as it is transferred.<\/td><\/tr><tr><td><code>-z<\/code><\/td><td>Compresses data in transit. Helps on slow links but costs CPU on fast LANs.<\/td><\/tr><tr><td><code>-e &quot;ssh &quot;<\/code><\/td><td>Sets SSH as the remote shell. Current rsync versions already use SSH by default, so this option only matters when you want to add SSH options such as a key file or port.<\/td><\/tr><tr><td><code>user@backupserver.com:\/backup\/<\/code><\/td><td>The destination: remote user, host and directory, separated by <code>@<\/code> and <code>:<\/code>.<\/td><\/tr><tr><td><code>$(date)<\/code><\/td><td>Command substitution that puts the current date and time into the email body.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> rsync only copies what has changed. When you run the script again, files that are already up to date on the server are skipped, so repeat runs finish quickly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>rsync<\/code> installed on <strong>both<\/strong> the local machine and the backup server (<code>sudo apt install rsync<\/code> or <code>sudo dnf install rsync<\/code>).<\/li>\n\n\n<li>SSH access to the backup server, using a key with no password prompt so the script can run unattended.<\/li>\n\n\n<li>A <code>mail<\/code> command: <code>mailutils<\/code> on Debian\/Ubuntu, or <code>s-nail<\/code>\/<code>mailx<\/code> on RHEL-family systems. You also need a working mail transfer agent such as Postfix, or a relay that is already set up. Without one, <code>mail<\/code> can exit cleanly and still deliver nothing.<\/li>\n\n\n<li>Write permission on the remote backup directory for the SSH user.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Set up a dedicated SSH key for backups and test that it logs in without a prompt:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">ssh-keygen -t ed25519 -f ~\/.ssh\/id_ed25519_backup -N <span class=\"hljs-string\">\"\"<\/span> -C <span class=\"hljs-string\">\"backup key\"<\/span>\nssh-copy-id -i ~\/.ssh\/id_ed25519_backup.pub user@backupserver.example.com\n\n<span class=\"hljs-comment\"># Must print OK without asking for a password<\/span>\nssh -i ~\/.ssh\/id_ed25519_backup -o BatchMode=yes user@backupserver.example.com <span class=\"hljs-string\">'echo OK'<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Run that first SSH login by hand. It stores the server&#039;s host key in <code>~\/.ssh\/known_hosts<\/code>. If you skip it, an unattended run fails with <code>Host key verification failed<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Problems with the original script<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>The email is always sent.<\/strong> The script never checks whether <code>rsync<\/code> succeeded, so a failed transfer still sends &quot;backup complete&quot;. That is worse than sending nothing.<\/li>\n\n\n<li><strong>Paths and addresses are hard-coded.<\/strong> To back up a different file, you have to edit the script.<\/li>\n\n\n<li><strong>There is no check that the source exists,<\/strong> and the remote directory is assumed to exist already.<\/li>\n\n\n<li><strong>Nothing records what happened.<\/strong> The rsync output goes to the terminal, or is lost when cron runs the script, and the email body holds only a date.<\/li>\n\n\n<li><strong>The script always exits with code 0<\/strong> because the last command is <code>mail<\/code>. Cron and monitoring tools cannot see that the backup failed.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Improved backup script<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This version takes the source path as an argument. It creates the remote directory, saves the rsync output, puts the result in the email subject and exits with a non-zero code on failure.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\">#!\/usr\/bin\/env bash<\/span>\n<span class=\"hljs-comment\"># remotebackup.sh - copy a local file or directory to a remote server over SSH<\/span>\nset -euo pipefail\n\nSRC=<span class=\"hljs-string\">\"${1:?Usage: $0 \/path\/to\/file-or-dir}\"<\/span>\nDEST_USER=<span class=\"hljs-string\">\"user\"<\/span>\nDEST_HOST=<span class=\"hljs-string\">\"backupserver.example.com\"<\/span>\nDEST_DIR=<span class=\"hljs-string\">\"\/backup\/$(hostname -s)\"<\/span>\nSSH_KEY=<span class=\"hljs-string\">\"$HOME\/.ssh\/id_ed25519_backup\"<\/span>\nMAIL_TO=<span class=\"hljs-string\">\"user@example.com\"<\/span>\nSSH_OPTS=(-i <span class=\"hljs-string\">\"$SSH_KEY\"<\/span> -o BatchMode=yes -o ConnectTimeout=<span class=\"hljs-number\">10<\/span>)\n\nLOG=<span class=\"hljs-string\">\"$(mktemp)\"<\/span>\ntrap <span class=\"hljs-string\">'rm -f \"$LOG\"'<\/span> <span class=\"hljs-keyword\">EXIT<\/span>\n\n<span class=\"hljs-keyword\">if<\/span> &#91;&#91; ! -e <span class=\"hljs-string\">\"$SRC\"<\/span> ]]; then\n  <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"ERROR: source '$SRC' does not exist\"<\/span> &gt;&amp;<span class=\"hljs-number\">2<\/span>\n  <span class=\"hljs-keyword\">exit<\/span> <span class=\"hljs-number\">1<\/span>\nfi\n\nSTART=<span class=\"hljs-string\">\"$(date '+%F %T')\"<\/span>\n\n<span class=\"hljs-keyword\">if<\/span> ssh <span class=\"hljs-string\">\"${SSH_OPTS&#91;@]}\"<\/span> <span class=\"hljs-string\">\"$DEST_USER@$DEST_HOST\"<\/span> <span class=\"hljs-string\">\"mkdir -p '$DEST_DIR'\"<\/span> &gt;&gt;<span class=\"hljs-string\">\"$LOG\"<\/span> <span class=\"hljs-number\">2<\/span>&gt;&amp;<span class=\"hljs-number\">1<\/span> &amp;&amp;\n   rsync -az --stats -e <span class=\"hljs-string\">\"ssh ${SSH_OPTS&#91;*]}\"<\/span> \\\n     <span class=\"hljs-string\">\"$SRC\"<\/span> <span class=\"hljs-string\">\"$DEST_USER@$DEST_HOST:$DEST_DIR\/\"<\/span> &gt;&gt;<span class=\"hljs-string\">\"$LOG\"<\/span> <span class=\"hljs-number\">2<\/span>&gt;&amp;<span class=\"hljs-number\">1<\/span>; then\n  RC=<span class=\"hljs-number\">0<\/span>\n  STATUS=<span class=\"hljs-string\">\"SUCCESS\"<\/span>\n<span class=\"hljs-keyword\">else<\/span>\n  RC=$?\n  STATUS=<span class=\"hljs-string\">\"FAILED (exit code $RC)\"<\/span>\nfi\n\n{\n  <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Backup of $SRC on $(hostname) started $START\"<\/span>\n  <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Destination: $DEST_USER@$DEST_HOST:$DEST_DIR\/\"<\/span>\n  <span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Result: $STATUS\"<\/span>\n  <span class=\"hljs-keyword\">echo<\/span>\n  cat <span class=\"hljs-string\">\"$LOG\"<\/span>\n} | mail -s <span class=\"hljs-string\">\"Backup $STATUS: $(hostname -s) $SRC\"<\/span> <span class=\"hljs-string\">\"$MAIL_TO\"<\/span>\n\n<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"Backup $STATUS\"<\/span>\n<span class=\"hljs-keyword\">exit<\/span> <span class=\"hljs-string\">\"$RC\"<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<ul class=\"wp-block-list\">\n<li><code>set -euo pipefail<\/code> stops the script on unexpected errors and unset variables. Commands used as an <code>if<\/code> condition do not trigger <code>-e<\/code>, so the script can still report a failure.<\/li>\n\n\n<li><code>${1:?...}<\/code> stops with a usage message when no path is given.<\/li>\n\n\n<li><code>BatchMode=yes<\/code> makes SSH fail at once instead of waiting for a password that nobody will type. <code>ConnectTimeout=10<\/code> stops the script from hanging on a host that cannot be reached.<\/li>\n\n\n<li>In the <code>else<\/code> branch, <code>$?<\/code> holds the exit code of the failed condition: <code>255<\/code> for SSH errors, or an rsync code such as <code>23<\/code> (partial transfer).<\/li>\n\n\n<li><code>trap ... EXIT<\/code> deletes the temporary log however the script ends.<\/li>\n\n\n<li>The key path is expanded into the <code>-e<\/code> string, so it must not contain spaces.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Run and verify the backup<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Make the script executable: <code>chmod +x remotebackup.sh<\/code>.<\/li>\n\n\n<li>Do a dry run first by temporarily adding <code>-n<\/code> (<code>--dry-run<\/code>) to the rsync options. rsync reports what it would send but transfers nothing.<\/li>\n\n\n<li>Run it for real: <code>.\/remotebackup.sh \/etc\/hosts<\/code>. A successful run prints <code>Backup SUCCESS<\/code>.<\/li>\n\n\n<li>Check the exit code: <code>echo $?<\/code> should print <code>0<\/code>.<\/li>\n\n\n<li>Confirm the file reached the server: <code>ssh -i ~\/.ssh\/id_ed25519_backup user@backupserver.example.com &#039;ls -l \/backup\/$(hostname -s)\/&#039;<\/code>. Use single quotes so <code>$(hostname -s)<\/code> runs on the server. If your backup server has a different short hostname, type the folder name instead.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Trailing slashes change what rsync copies. <code>rsync -a \/data dest:\/backup\/<\/code> creates <code>\/backup\/data\/<\/code>. <code>rsync -a \/data\/ dest:\/backup\/<\/code> copies the contents of <code>\/data<\/code> straight into <code>\/backup\/<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Schedule it with cron<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open your crontab with <code>crontab -e<\/code> and add a line. Cron runs with a minimal environment, so use absolute paths everywhere:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\"># Every day at 02:30<\/span>\n<span class=\"hljs-number\">30<\/span> <span class=\"hljs-number\">2<\/span> * * * \/usr\/local\/bin\/remotebackup.sh \/home\/app\/data &gt;&gt; \/home\/app\/remotebackup-cron.log <span class=\"hljs-number\">2<\/span>&gt;&amp;<span class=\"hljs-number\">1<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Run the job as the same user that owns the SSH key and <code>known_hosts<\/code> entry. Otherwise SSH looks in another home directory and authentication fails.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Common errors and fixes<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Error<\/th><th>Cause<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td><code>Permission denied (publickey)<\/code><\/td><td>The key is not in the remote <code>authorized_keys<\/code>, or the wrong key or user is in use.<\/td><td>Run <code>ssh-copy-id<\/code> again and check the <code>-i<\/code> path and the remote user name.<\/td><\/tr><tr><td><code>Host key verification failed<\/code><\/td><td>The server&#039;s host key is not in <code>known_hosts<\/code> for the user running the script.<\/td><td>Connect once by hand as that user, or add the key with <code>ssh-keyscan<\/code> after checking its fingerprint.<\/td><\/tr><tr><td><code>rsync: command not found<\/code> (remote side)<\/td><td>rsync is not installed on the backup server.<\/td><td>Install <code>rsync<\/code> on the server.<\/td><\/tr><tr><td><code>mail: command not found<\/code><\/td><td>No mail client is installed.<\/td><td>Install <code>mailutils<\/code> or <code>s-nail<\/code>.<\/td><\/tr><tr><td>Script succeeds but no email arrives<\/td><td>No MTA or relay is set up, or the message was marked as spam.<\/td><td>Set up Postfix or a relay, and check the local mail log.<\/td><\/tr><tr><td>rsync exit code <code>23<\/code><\/td><td>Some files could not be read, usually because of permissions.<\/td><td>Check the rsync output in the email for the files involved and fix their permissions.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Restoring and making backups safer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To restore, run rsync with the source and destination swapped:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">rsync -av -e <span class=\"hljs-string\">\"ssh -i $HOME\/.ssh\/id_ed25519_backup\"<\/span> \\\n  user@backupserver.example.com:<span class=\"hljs-regexp\">\/backup\/my<\/span>host\/yourfile \/tmp\/restore\/<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<ul class=\"wp-block-list\">\n<li>This script keeps only one copy, which is overwritten on every run. If a file becomes corrupted, the bad version replaces the good one at the next run. For history, write each run to a dated directory such as <code>$DEST_DIR\/$(date +%F)\/<\/code>, or use <code>--link-dest<\/code> so unchanged files are stored as hard links.<\/li>\n\n\n<li>Use a dedicated, unprivileged backup user on the server. Do not log in as root.<\/li>\n\n\n<li>Protect the private key with <code>chmod 600<\/code>. On the server you can limit the key to rsync with a <code>command=<\/code> restriction in <code>authorized_keys<\/code>, for example with the <code>rrsync<\/code> helper that some rsync packages include.<\/li>\n\n\n<li>Do not add <code>--delete<\/code> unless you mean it. It removes files from the backup when they are deleted locally.<\/li>\n\n\n<li>Test a restore regularly. A backup you have never restored from is unproven.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For more practice, see the other exercises in <a href=\"https:\/\/www.devopsschool.com\/blog\/category\/programming\/shell-script\/\">More Shell Scripting tutorials<\/a>, and try moving the email logic into a reusable function with the help of <a href=\"https:\/\/www.devopsschool.com\/blog\/shell-scripting-tutorials-function\/\">Shell Scripting Tutorials: Function<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">What is the difference between rsync and scp for backups?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">scp copies every file in full each time. rsync compares source and destination and sends only what has changed, and it can resume and keep file metadata. That makes rsync better for repeated backups.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I run an rsync backup over SSH without typing a password?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create an SSH key pair with <code>ssh-keygen<\/code> and install the public key on the server with <code>ssh-copy-id<\/code>. Then point rsync at the key with <code>-e &quot;ssh -i ~\/.ssh\/keyfile&quot;<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does rsync delete files on the backup server?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Not by default. Files are deleted on the destination only when you add <code>--delete<\/code> or one of the related options.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why does my backup script work by hand but fail in cron?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Cron uses a minimal environment with a short PATH, and it may run as a different user. Use absolute paths, run the job as the user who owns the SSH key, and redirect output to a log file so you can see the error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How can I tell if the rsync backup failed?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check rsync&#039;s exit code: <code>0<\/code> means success and any other value means failure, with <code>255<\/code> meaning an SSH error. The improved script puts this code in the email subject and also returns it as its own exit code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related tutorials<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/category\/programming\/shell-script\/\">More Shell Scripting tutorials<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/shell-scripting-tutorials-function\/\">Shell Scripting Tutorials: Function<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/what-is-bash-and-use-cases-of-bash\/\">What is Bash and use cases of Bash?<\/a><\/li>\n\n\n<li><a href=\"https:\/\/www.devopsschool.com\/blog\/test-your-shell-scripting-skills-program-9\/\">Shell Bash Scripting: Assignment &amp; Excercise \u2013 4<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This exercise uses Bash, rsync and SSH to copy a local file to a remote backup server, then sends an email when the copy finishes. Below the&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[454],"tags":[26281,137],"class_list":["post-2344","post","type-post","status-publish","format-standard","hentry","category-shell-script","tag-backup-and-restore","tag-bash"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2344"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2344\/revisions"}],"predecessor-version":[{"id":80163,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2344\/revisions\/80163"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}