{"id":224,"date":"2025-04-03T08:59:59","date_gmt":"2025-04-03T06:59:59","guid":{"rendered":"https:\/\/www.24x7serverguard.com\/blog\/?p=224"},"modified":"2025-04-03T09:01:56","modified_gmt":"2025-04-03T07:01:56","slug":"how-to-take-incremental-backup-of-a-reseller-account-on-a-backup-server","status":"publish","type":"post","link":"https:\/\/www.24x7serverguard.com\/blog\/cpanel\/how-to-take-incremental-backup-of-a-reseller-account-on-a-backup-server\/","title":{"rendered":"How to Take Incremental Backup of a Reseller Account on a Backup Server"},"content":{"rendered":"\n<p>Performing incremental backups for reseller accounts ensures <strong>data security<\/strong> and <strong>efficient storage management<\/strong>. Follow the steps below to automate the backup process.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Identify Usernames Under Reseller Account<\/strong> (On Shared\/Source Server)<\/h3>\n\n\n\n<p>1\ufe0f\u20e3 Create a backup script:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">vi \/home\/resellerUsername\/backup.sh<\/mark><\/p>\n\n\n\n<p>2\ufe0f\u20e3 Add the following command to extract usernames under the reseller account:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">cat \/etc\/trueuserowners | grep resellerUsername | awk -F: &#8216;{print $1}&#8217; > \/home\/resellerUsername\/resellerUsername.txt<\/mark><\/p>\n\n\n\n<p>3\ufe0f\u20e3 Save the file and set executable permissions:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">chmod 755 \/home\/resellerUsername\/backup.sh<\/mark><\/p>\n\n\n\n<p>4\ufe0f\u20e3 Schedule a daily cron job in <strong>cPanel<\/strong> of the reseller account:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">0 0 * * * sh \/home\/resellerUsername\/backup.sh<\/mark><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Configure Backup Server<\/strong><\/h3>\n\n\n\n<p>1\ufe0f\u20e3 Create a backup script:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">vi \/home\/backupUsername\/backup.sh<\/mark><\/p>\n\n\n\n<p>2\ufe0f\u20e3 Add the following <strong>rsync<\/strong> commands to fetch data from the source server:<\/p>\n\n\n\n<p>\u2714 <strong>Sync Reseller Account List<\/strong><\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">\/usr\/bin\/rsync -vrplogDtH -e &#8220;ssh -p SSH-PORT&#8221; root@Source_Server_Hostname:\/home\/resellerUsername\/resellerUsername.txt \/home\/backupUsername\/<\/mark><\/p>\n\n\n\n<p>\u2714 <strong>Sync User Data<\/strong><\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">for i in <code>cat \/home\/backupUsername\/resellerUsername.txt<\/code>; do<br>\/usr\/bin\/rsync -vrplogDtH -e &#8220;ssh -p SSH-PORT&#8221; root@Source_Server_Hostname:\/home\/$i \/home\/backupUsername\/weekly-data;<br>done<\/mark><\/p>\n\n\n\n<p>\u2714 <strong>Sync MySQL Databases<\/strong><\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">for i in <code>cat \/home\/backupUsername\/resellerUsername.txt<\/code>; do<br>\/usr\/bin\/rsync -vrplogDtH -e &#8220;ssh -p SSH-PORT&#8221; root@Source_Server_Hostname:\/var\/lib\/mysql\/$i* \/home\/backupUsername\/weekly-mysql\/;<br>done<\/mark><\/p>\n\n\n\n<p>\u2714 <strong>Update File Ownership for FTP Access<\/strong><\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">chown backupUsername:backupUsername \/home\/backupUsername\/weekly-data\/ -R<br>chown backupUsername:backupUsername \/home\/backupUsername\/weekly-mysql\/ -R<\/mark><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Schedule Automatic Backup on Backup Server<\/strong><\/h3>\n\n\n\n<p>1\ufe0f\u20e3 Save the file and set executable permissions:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">chmod 755 \/home\/backupUsername\/backup.sh<\/mark><\/p>\n\n\n\n<p>2\ufe0f\u20e3 Add a <strong>cron job<\/strong> to execute the backup script daily:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">vi \/var\/spool\/cron\/root<\/mark><\/p>\n\n\n\n<p>3\ufe0f\u20e3 Add the following line to schedule the script to run at <strong>midnight daily<\/strong>:<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">0 0 * * * \/bin\/bash \/home\/backupUsername\/backup.sh<\/mark><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Performing incremental backups for reseller accounts ensures data security and efficient storage management. Follow the steps below to automate the backup process. Step 1: Identify Usernames Under Reseller Account (On Shared\/Source Server) 1\ufe0f\u20e3 Create a backup script: vi \/home\/resellerUsername\/backup.sh 2\ufe0f\u20e3 Add the following command to extract usernames under the reseller account: cat \/etc\/trueuserowners | grep [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":227,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[161,154,159,162,156,155,158,160,163,153,157,164],"class_list":["post-224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","tag-automatedbackup","tag-backupusername","tag-cpanelbackup","tag-datasecurity","tag-ensure-ssh-access-is-configured-between-source-and-backup-servers-for-smooth-data-transfer","tag-esellerusername-with-actual-values","tag-incrementalbackup","tag-linuxserverbackup","tag-mysqlbackup","tag-replace-source_server_hostname","tag-reselleraccountbackup","tag-serverbackup"],"_links":{"self":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":1,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"predecessor-version":[{"id":226,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/posts\/224\/revisions\/226"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/media\/227"}],"wp:attachment":[{"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serverguard.com\/blog\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}