{"id":1259,"date":"2017-05-21T13:08:31","date_gmt":"2017-05-21T13:08:31","guid":{"rendered":"https:\/\/www.xsofthost.com\/help\/?p=1259"},"modified":"2021-03-16T19:51:06","modified_gmt":"2021-03-16T19:51:06","slug":"how-to-run-and-force-cpanel-backup-using-ssh","status":"publish","type":"post","link":"https:\/\/www.xsofthost.com\/help\/how-to-run-and-force-cpanel-backup-using-ssh\/","title":{"rendered":"How to run and force cPanel backup using SSH"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1259\" class=\"elementor elementor-1259\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-4f40cc0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"4f40cc0\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-70fc238\" data-id=\"70fc238\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1523665 elementor-widget elementor-widget-text-editor\" data-id=\"1523665\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.xsofthost.com\/help\/category\/whm-cpanel\/\" target=\"_blank\" rel=\"noopener\">cPanel<\/a><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">\u00a0allows you to\u00a0<\/span><b style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif;\">force cPanel backup<\/b><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\"> the system using SSH connection :<\/span><b style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif;\">\/usr\/local\/cpanel\/bin\/backup<\/b><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\"> script to run a manual backup in WHM via the command line.\u00a0<\/span><\/p>\n<p><span style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight );\">The system reads the backup configuration file and then performs the actions defined in the file. By default, the system performs this process in the background.<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a4079c7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a4079c7\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1176df2\" data-id=\"1176df2\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5a7e81d elementor-widget elementor-widget-heading\" data-id=\"5a7e81d\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">cPanel Backup Shell Commands<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ec3da74 elementor-widget elementor-widget-heading\" data-id=\"ec3da74\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">To Run NEW cPanel Backup System via command\n<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-534eefc elementor-widget elementor-widget-code-highlight\" data-id=\"534eefc\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>\/usr\/local\/cpanel\/bin\/backup<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5193a1d elementor-widget elementor-widget-heading\" data-id=\"5193a1d\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">To Force cPanel to perform a new backup via SSH\n<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ce98641 elementor-widget elementor-widget-code-highlight\" data-id=\"ce98641\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>\/usr\/local\/cpanel\/bin\/backup --force\n\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fecb19d elementor-widget elementor-widget-heading\" data-id=\"fecb19d\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">cPanel Legacy backup system via SSH<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fb4532a elementor-widget elementor-widget-code-highlight\" data-id=\"fb4532a\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>\/usr\/local\/cpanel\/scripts\/cpbackup\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-85c27d9 elementor-widget elementor-widget-heading\" data-id=\"85c27d9\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Force cPanel to perform a new backup via SSH<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3f935b0 elementor-widget elementor-widget-code-highlight\" data-id=\"3f935b0\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>\/usr\/local\/cpanel\/scripts\/cpbackup \u2013-force<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a9b908e elementor-widget elementor-widget-heading\" data-id=\"a9b908e\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">All Manual Backup Script Options<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-58717ac elementor-widget elementor-widget-text-editor\" data-id=\"58717ac\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The <b>\/usr\/local\/cpanel\/bin\/backup <\/b>script accepts the following options:<\/p>\n<ul>\n<li><b>Debug<\/b> : Runs the backup in the foreground and prints its progress on the command line. <b>Example :&#8211;debug<br \/><\/b><\/li>\n<li><b>Allow Override<\/b>:When the system performs the backup, use the pkgacct script in the the \/var\/cpanel\/lib\/Whostmgr\/Pkgacct\/pkgacct directory. <b>Example : &#8211;allow-override<br \/><\/b><\/li>\n<li><b>Force Option<\/b>:Performs extra backup, even if the system already contains up-to-date backup data files.<b> Example: &#8211;force<br \/><\/b><\/li>\n<li><b> Help<\/b>: Displays additional information.<b>Example :&#8211;help <\/b><\/li>\n<\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d41f16a elementor-widget elementor-widget-heading\" data-id=\"d41f16a\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Run Script Backup for single account<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9869257 elementor-widget elementor-widget-text-editor\" data-id=\"9869257\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>To back up a single cPanel account, you can use The <b>pkgacct<\/b> Script instead.<\/p>\n<p>To perform this single backup :<\/p>\n<ol>\n<li>log into your server via SSH as root.\u00a0<\/li>\n<li>Run the following command, optionally adding flags, followed by the username of the cPanel user you&#8217;d like to backup, and the directory you&#8217;d like used for the output.<\/li>\n<\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b173814 elementor-widget elementor-widget-heading\" data-id=\"b173814\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">pkgacct Script Backup Option<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-73d0a05 elementor-widget elementor-widget-text-editor\" data-id=\"73d0a05\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul>\n<li><b>USERNAME<\/b> : Required The cPanel account username for which to create a cpmove archive. You must pass this option after any options, but before the DIRECTORY option.<\/li>\n<li><b>DIRECTORY<\/b>:The directory path in which to store the archive. By default, the script uses the \/home directory. You must pass this option after the USERNAME option.<\/li>\n<li><b>&#8211;allow-override<\/b>:Use the \/var\/cpanel\/lib\/Whostmgr\/Pkgacct\/pkgacct file to package the account, if it exists.<\/li>\n<li><b>&#8211;mysql=VERSION<\/b>:The archive\u2019s required minimum version of MySQL\u00ae. <b>Example : &#8211;mysql=5.2.1<\/b><\/li>\n<li><b>&#8211;roundcube=VERSION<\/b>:The archive\u2019s required minimum version of Roundcube. <b>Example : &#8211;roundcube=3.0<\/b><\/li>\n<li><b>&#8211;dbbackup=TYPE<\/b>:With Types :all, schema ,name.\u00a0<b>Example : &#8211;dbbackup=all<\/b><\/li>\n<\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>cPanel\u00a0allows you to\u00a0force cPanel backup the system using SSH connection :\/usr\/local\/cpanel\/bin\/backup script to run a manual backup in WHM via the command line.\u00a0 The system reads the backup configuration file and then performs the actions defined in the file. By default, the system performs this process in the background. cPanel Backup Shell Commands To Run [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":363,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[41,5],"tags":[4,171,50,149,142,29],"_links":{"self":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/1259"}],"collection":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/comments?post=1259"}],"version-history":[{"count":85,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/1259\/revisions"}],"predecessor-version":[{"id":2777,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/1259\/revisions\/2777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/media\/363"}],"wp:attachment":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/media?parent=1259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/categories?post=1259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/tags?post=1259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}