{"id":10089,"date":"2021-03-08T08:18:47","date_gmt":"2021-03-07T22:18:47","guid":{"rendered":"https:\/\/nsrd.info\/blog\/?p=10089"},"modified":"2025-02-28T02:28:56","modified_gmt":"2025-02-27T16:28:56","slug":"avamar-basics-working-with-pre-backup-commands","status":"publish","type":"post","link":"https:\/\/nsrd.info\/blog\/2021\/03\/08\/avamar-basics-working-with-pre-backup-commands\/","title":{"rendered":"Avamar Basics \u2013 Working with Pre-Backup Commands"},"content":{"rendered":"\n<p><em>Artist credit for post image above: Andrey Suslov via Bigstock.Com.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction to Pre-Backup Commands<\/h2>\n\n\n\n<p>In complex environments, pre- and post-backup commands can really help you out.<\/p>\n\n\n\n<p>Over the years, I&#8217;ve used them for a variety of things, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pre-command examples<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Generating a database dump when there&#8217;s no agent<\/li>\n\n\n\n<li>Storing data from an appliance (e.g., executing remote commands against a switch to record its configuration, and write it to a file on the local client for backup)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Post-command examples<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Automated post-backup reboots for in special scenarios<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Pre- and post-command examples<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Shutting down a database for a cold backup, then restarting it after the backup is complete.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Avamar Pre- and Post-Backup Commands<\/h2>\n\n\n\n<p>Within Avamar, you define pre- and\/or post-backup commands within the <em>dataset<\/em>, which is the configuration of what will be protected. Datasets are attached to backup policies, and you can either:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a new dataset when you&#8217;re creating a policy,<\/li>\n\n\n\n<li>Attach an existing dataset when you&#8217;re creating a policy, or<\/li>\n\n\n\n<li>Edit a previously created dataset.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Example \u2013 Configuring Avamar Pre-Backup Commands<\/h2>\n\n\n\n<p>I&#8217;m going to walk through an example of configuring a new Avamar agent-based client (&#8216;totesrhelly&#8217;), which will have a pre-backup command that runs a series of commands and saves them to a directory on the host.<\/p>\n\n\n\n<p>I&#8217;ve not captured the process of downloading and installing the Avamar client software, or registering the agent \u2013&nbsp;we pickup the process with a new policy wizard run in the Avamar web-based UI:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/00-Create-Policy.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1203\" height=\"356\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/00-Create-Policy.png\" alt=\"\" class=\"wp-image-10091\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/00-Create-Policy.png 1203w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/00-Create-Policy-300x89.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/00-Create-Policy-1024x303.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/00-Create-Policy-768x227.png 768w\" sizes=\"auto, (max-width: 1203px) 100vw, 1203px\" \/><\/a><figcaption class=\"wp-element-caption\">Adding a new policy in Avamar UI<\/figcaption><\/figure>\n\n\n\n<p>To start the wizard, go into the desired Avamar domain under <strong>Policy &gt; Backup Policy<\/strong>, and click the <strong>+Add<\/strong> button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/01-New-Policy-Policy-Name.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1154\" height=\"827\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/01-New-Policy-Policy-Name.png\" alt=\"Avamar New Policy - Properties\" class=\"wp-image-10092\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/01-New-Policy-Policy-Name.png 1154w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/01-New-Policy-Policy-Name-300x215.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/01-New-Policy-Policy-Name-1024x734.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/01-New-Policy-Policy-Name-768x550.png 768w\" sizes=\"auto, (max-width: 1154px) 100vw, 1154px\" \/><\/a><figcaption class=\"wp-element-caption\">Avamar New Policy &#8211; Properties<\/figcaption><\/figure>\n\n\n\n<p>Since this is just a lab setup, I entered a policy name of &#8220;LinuxPreBackup&#8221;, and left the other settings alone before clicking <strong>Next<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/02-New-Policy-Select-Clients-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"735\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/02-New-Policy-Select-Clients-1-1024x735.png\" alt=\"\" class=\"wp-image-10095\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/02-New-Policy-Select-Clients-1-1024x735.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/02-New-Policy-Select-Clients-1-300x215.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/02-New-Policy-Select-Clients-1-768x551.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/02-New-Policy-Select-Clients-1.png 1150w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Choosing Policy Members (aka clients)<\/figcaption><\/figure>\n\n\n\n<p>The next step was to choose the &#8216;Policy Members&#8217;, or in other words, the clients. I selected my client, &#8216;totesrhelly&#8217;, and clicked <strong>Next<\/strong>.<\/p>\n\n\n\n<p>When you click next, you&#8217;ll go into the Dataset configuration section, and this is where you&#8217;ll configure your pre-command. I elected to create a new dataset and called it &#8216;LinuxWithPreCommand&#8217;. <\/p>\n\n\n\n<p>You then select the base plugin type (in my case, <strong>Linux Filesystem<\/strong>), and activate the &#8220;<strong>Show Advanced Options<\/strong>&#8221; setting:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/03-New-Policy-Dataset-Advanced-Options.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1150\" height=\"822\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/03-New-Policy-Dataset-Advanced-Options.png\" alt=\"Dataset with Plugin and Advanced Options Enabled\" class=\"wp-image-10097\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/03-New-Policy-Dataset-Advanced-Options.png 1150w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/03-New-Policy-Dataset-Advanced-Options-300x214.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/03-New-Policy-Dataset-Advanced-Options-1024x732.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/03-New-Policy-Dataset-Advanced-Options-768x549.png 768w\" sizes=\"auto, (max-width: 1150px) 100vw, 1150px\" \/><\/a><figcaption class=\"wp-element-caption\">Dataset with Plugin and Advanced Options Enabled<\/figcaption><\/figure>\n\n\n\n<p>With &#8220;Show Advanced Options&#8221; enabled, you can scroll down further in the dataset where you&#8217;ll find the option to set a pre- and post- backup command.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Now to Do A Pre-Command<\/h2>\n\n\n\n<p>So &#8230; it had been a little while since I&#8217;d configured a pre-command in Avamar, and I stuffed up, initially!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/04-New-Policy-Incorrect-PreCommand.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1150\" height=\"824\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/04-New-Policy-Incorrect-PreCommand.png\" alt=\"Specifying the pre-command (watch out, there's an error)\" class=\"wp-image-10100\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/04-New-Policy-Incorrect-PreCommand.png 1150w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/04-New-Policy-Incorrect-PreCommand-300x215.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/04-New-Policy-Incorrect-PreCommand-1024x734.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/04-New-Policy-Incorrect-PreCommand-768x550.png 768w\" sizes=\"auto, (max-width: 1150px) 100vw, 1150px\" \/><\/a><figcaption class=\"wp-element-caption\">Specifying the pre-command (watch out, there&#8217;s an error)<\/figcaption><\/figure>\n\n\n\n<p>When I configured the pre-command, I forgot one important detail. Here&#8217;s the relevant information from the administration guide:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/06-Aside-Why-it-Failed.png\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"303\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/06-Aside-Why-it-Failed.png\" alt=\"Admin guide details on where a pre-command has to be located\" class=\"wp-image-10102\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/06-Aside-Why-it-Failed.png 924w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/06-Aside-Why-it-Failed-300x98.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/06-Aside-Why-it-Failed-768x252.png 768w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><\/a><figcaption class=\"wp-element-caption\">Admin guide details on where a pre-command has to be located<\/figcaption><\/figure>\n\n\n\n<p>I&#8217;d forgotten that \u2013&nbsp;so I&#8217;ll jump briefly ahead and show you the error I got when I tried to run the finished policy:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/05-Aside-Failure-on-Run.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1149\" height=\"760\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/05-Aside-Failure-on-Run.png\" alt=\"Failure log from incorrect specification of pre-command\" class=\"wp-image-10103\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/05-Aside-Failure-on-Run.png 1149w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/05-Aside-Failure-on-Run-300x198.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/05-Aside-Failure-on-Run-1024x677.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/05-Aside-Failure-on-Run-768x508.png 768w\" sizes=\"auto, (max-width: 1149px) 100vw, 1149px\" \/><\/a><figcaption class=\"wp-element-caption\">Failure log from incorrect specification of pre-command<\/figcaption><\/figure>\n\n\n\n<p>When I saw the error I moved the script into the correct directory and tried to re-run the backup, but:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/07-Rerun-Fails-after-Fixing-Because-It-Keeps-Settings.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1483\" height=\"634\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/07-Rerun-Fails-after-Fixing-Because-It-Keeps-Settings.png\" alt=\"Re-running the policy also failed\" class=\"wp-image-10104\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/07-Rerun-Fails-after-Fixing-Because-It-Keeps-Settings.png 1483w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/07-Rerun-Fails-after-Fixing-Because-It-Keeps-Settings-300x128.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/07-Rerun-Fails-after-Fixing-Because-It-Keeps-Settings-1024x438.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/07-Rerun-Fails-after-Fixing-Because-It-Keeps-Settings-768x328.png 768w\" sizes=\"auto, (max-width: 1483px) 100vw, 1483px\" \/><\/a><figcaption class=\"wp-element-caption\">Re-running the policy also failed<\/figcaption><\/figure>\n\n\n\n<p>Re-running the policy failed! There&#8217;s a good explanation for that though: when you choose to re-run a backup in the Activity window, Avamar re-runs the backup as it was configured. But in this scenario, that meant it ran it again with the misconfigured invocation of the dataset pre-command.<\/p>\n\n\n\n<p>When I edited the dataset options, here&#8217;s the correct pre-script definition:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/08-Edit-Dataset-Correct-Option.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1147\" height=\"737\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/08-Edit-Dataset-Correct-Option.png\" alt=\"Edited dataset with correct pre-script option\" class=\"wp-image-10105\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/08-Edit-Dataset-Correct-Option.png 1147w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/08-Edit-Dataset-Correct-Option-300x193.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/08-Edit-Dataset-Correct-Option-1024x658.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/08-Edit-Dataset-Correct-Option-768x493.png 768w\" sizes=\"auto, (max-width: 1147px) 100vw, 1147px\" \/><\/a><figcaption class=\"wp-element-caption\">Edited dataset with correct pre-script option<\/figcaption><\/figure>\n\n\n\n<p>(That also meant moving the script to the <strong>\/usr\/local\/avamar\/etc\/scripts<\/strong> directory.)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Finishing the Policy<\/h2>\n\n\n\n<p>OK, so I got the policy wrong initially, but you can see the corrected details above. Here are the remaining configuration steps. First, the schedule:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/09-Policy-Schedule.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1150\" height=\"821\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/09-Policy-Schedule.png\" alt=\"Creating a new policy schedule\" class=\"wp-image-10106\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/09-Policy-Schedule.png 1150w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/09-Policy-Schedule-300x214.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/09-Policy-Schedule-1024x731.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/09-Policy-Schedule-768x548.png 768w\" sizes=\"auto, (max-width: 1150px) 100vw, 1150px\" \/><\/a><figcaption class=\"wp-element-caption\">Creating a new policy schedule<\/figcaption><\/figure>\n\n\n\n<p>I created a new schedule (<strong>LinuxFSWithPreCommand<\/strong>) with a 4-hour backup window starting at 01:00 and no policy expiration time. Clicking <strong>Next<\/strong> took me through to the retention definition:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/10-Policy-Retention.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1151\" height=\"825\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/10-Policy-Retention.png\" alt=\"Creating a new retention for the policy\" class=\"wp-image-10107\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/10-Policy-Retention.png 1151w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/10-Policy-Retention-300x215.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/10-Policy-Retention-1024x734.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/10-Policy-Retention-768x550.png 768w\" sizes=\"auto, (max-width: 1151px) 100vw, 1151px\" \/><\/a><figcaption class=\"wp-element-caption\">Creating a new retention for the policy<\/figcaption><\/figure>\n\n\n\n<p>I created a new retention called &#8220;LinuxNonProd&#8221; with a retention of 30 days and clicked <strong>Next<\/strong> to go to the Summary tab:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/11-Policy-Summary.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1150\" height=\"825\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/11-Policy-Summary.png\" alt=\"New Policy Summary\" class=\"wp-image-10108\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/11-Policy-Summary.png 1150w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/11-Policy-Summary-300x215.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/11-Policy-Summary-1024x735.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/11-Policy-Summary-768x551.png 768w\" sizes=\"auto, (max-width: 1150px) 100vw, 1150px\" \/><\/a><figcaption class=\"wp-element-caption\">New Policy Summary<\/figcaption><\/figure>\n\n\n\n<p>And it was a final <strong>Finish<\/strong> to create the policy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Successful Pre-Backup Commands Executed<\/h2>\n\n\n\n<p>So, after I got past my initial incorrect configuration, I did get a successful pre-command execution in my backup job:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/12-Successful-Run.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1129\" height=\"512\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/12-Successful-Run.png\" alt=\"Successful policy run with backup pre-command\" class=\"wp-image-10109\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/12-Successful-Run.png 1129w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/12-Successful-Run-300x136.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/12-Successful-Run-1024x464.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/12-Successful-Run-768x348.png 768w\" sizes=\"auto, (max-width: 1129px) 100vw, 1129px\" \/><\/a><figcaption class=\"wp-element-caption\">Successful policy run with backup pre-command<\/figcaption><\/figure>\n\n\n\n<p>When you view the logs, you can readily find logging information to show the pre-command was executed successfully, too:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/13-Precommand-Execute-in-Log.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1151\" height=\"758\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/13-Precommand-Execute-in-Log.png\" alt=\"Backup job log showing pre-command successfully executed\" class=\"wp-image-10110\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/13-Precommand-Execute-in-Log.png 1151w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/13-Precommand-Execute-in-Log-300x198.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/13-Precommand-Execute-in-Log-1024x674.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/13-Precommand-Execute-in-Log-768x506.png 768w\" sizes=\"auto, (max-width: 1151px) 100vw, 1151px\" \/><\/a><figcaption class=\"wp-element-caption\">Backup job log showing pre-command successfully executed<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Seeing the Pre-Backup Command Result<\/h2>\n\n\n\n<p>And finally, here&#8217;s output of me logging into the Linux client, viewing the pre-command script, and confirming it had run:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/14-PreCommand-Results.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1874\" height=\"1101\" src=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/14-PreCommand-Results.png\" alt=\"Pre-Command Script and Results\" class=\"wp-image-10112\" srcset=\"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/14-PreCommand-Results.png 1874w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/14-PreCommand-Results-300x176.png 300w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/14-PreCommand-Results-1024x602.png 1024w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/14-PreCommand-Results-768x451.png 768w, https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/14-PreCommand-Results-1536x902.png 1536w\" sizes=\"auto, (max-width: 1874px) 100vw, 1874px\" \/><\/a><figcaption class=\"wp-element-caption\">Pre-Command Script and Results<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping up Avamar Pre-Backup Commands<\/h2>\n\n\n\n<p>You can see from the above that configuring Avamar pre-backup scripts are pretty trivial. In almost all circumstances I can practically guarantee you&#8217;ll spend more time writing the actual pre-backup script (or post-backup script for that matter) than you will with the configuration. And unlike my initial incorrect configuration above, if you remember to put the script in the right location first go, you&#8217;ll have a successful result in minutes.<\/p>\n\n\n\n<p>Hey \u2013&nbsp;before I go, don&#8217;t forget to check out the second edition of <strong><a href=\"https:\/\/www.routledge.com\/Data-Protection-Ensuring-Data-Availability\/Guise\/p\/book\/9780367256777\" target=\"_blank\" rel=\"noreferrer noopener\">Data Protection: Ensuring Data Availability<\/a><\/strong>! If you&#8217;re interested in learning about data protection in-depth, regardless of whether it&#8217;s on-premises or in the cloud, it&#8217;ll be an invaluable resource for you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Artist credit for post image above: Andrey Suslov via Bigstock.Com. Introduction to Pre-Backup Commands In complex environments, pre- and post-backup&hellip;<\/p>\n","protected":false},"author":1,"featured_media":10115,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1154,20],"tags":[1601,1600],"class_list":["post-10089","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-avamar-2","category-scripting","tag-post-script","tag-pre-script"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/nsrd.info\/blog\/wp-content\/uploads\/2021\/03\/bigStock-Programming.jpg","jetpack_shortlink":"https:\/\/wp.me\/pKpIN-2CJ","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/10089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/comments?post=10089"}],"version-history":[{"count":5,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/10089\/revisions"}],"predecessor-version":[{"id":12064,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/posts\/10089\/revisions\/12064"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media\/10115"}],"wp:attachment":[{"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/media?parent=10089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/categories?post=10089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsrd.info\/blog\/wp-json\/wp\/v2\/tags?post=10089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}