Skip to main content

backup in rescue omde

Comments

12 comments

  • andrew.n
    Certain services can't be started in chroot so you should backup with skipping the DNS entries and then manually move over the zones files from /var/named and either insrease the SOL (serial number) manually or re-saving the entries from WHM after restore. You can use this command for backup: /scripts/pkgacct --skipdnszones cpuser
    0
  • cPanelBrianK
    Hello @Gojko, I am sorry to hear you are having difficulties performing the disaster recovery steps detailed in the linked article. This article is in the process of being updated to address some of the issues you are facing. To best assist you, I can provide the details I filed for change here for your immediate reference. The MySQL startup error indicates that there is not an error_log entry configured in the my.cnf. This will need to be added or you can append it to the daemonize command. The MySQL service should not be daemonized under the root user and that will also need to be addressed in the command. In your case, the following command would be expected to address these errors. test -f /etc/sysconfig/mysql && source /etc/sysconfig/mysql; /usr/sbin/mysqld --daemonize --user=mysql --log-error=/var/log/mysqld.log --pid file=/var/run/mysqld/mysqld.pid ${MYSQLD_OPTS}
    In regards to the DNSAdmin error, the advice provided by @andrew.n is correct. I recommend using the --skipdnszones to exclude these during the backup process. Any custom DNS entries will need to be manually copied over or recreated afterward.
    0
  • Gojko
    Thank you for respond andrew and briank Now i have another error @cPanelBrianK {chrooted}root@rescue / # test -f /etc/sysconfig/mysql && source /etc/sysconfig/mysql; /usr/sbin/mysqld --daemonize --user=mysql --log-error=/var/log/mysqld.log --pid file=/var/run/mysqld/mysqld.pid ${MYSQLD_OPTS} Initialization of mysqld failed: 0
    this error is because i didn't start mysql from command above? [2020-10-12 13:50:24 +0200] Creating Archive .................................................................................... .............................. [2020-10-12 13:55:07 +0200] Done [2020-10-12 13:55:07 +0200] pkgacctfile is: /home/cpmove-username.tar.gz [2020-10-12 13:55:17 +0200] md5sum is: b51aa55cc46362dc1cabf7a44aeb20cb [2020-10-12 13:55:17 +0200] [2020-10-12 13:55:17 +0200] size is: 6018518198 [2020-10-12 13:55:17 +0200] [2020-10-12 13:55:17 +0200] homesize is: 7310884864 [2020-10-12 13:55:17 +0200] [2020-10-12 13:55:17 +0200] homefiles is: 38510 warn [pkgacct] Error while connecting to MySQL: (XID njtxmg) The system failed to connect to the "MySQL" database "mysql" because of an error: CR_CONNECTION_ERROR (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)) [2020-10-12 13:55:17 +0200] Error while connecting to MySQL: (XID njtxmg) The system failed to connect to the "MySQL" database "mysql" because of an error: CR_CONNECTION_ERROR (Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)) at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 437.
    @andrew.n for /var/named i need to copy the whole named folder to new server and then what? is this /scrtips/rebuildnamedconf will help to change IP of new server in DNS and fix? also cPanelBriank: " Any custom DNS entries will need to be manually copied over or recreated afterward." this will not fixed by copy /var/named files to new server?
    0
  • andrew.n
    Yes the error is because MySQL didn't start. Once you moved the /var/named folder you can mass change the IP of the accounts from WHM under Change Multiple IPs. All entries will be copied over if you move /var/named. Whats the source OS? Is it CentOS 6 or 7 or 8? Disaster recovery can be troublesome sometimes and cPanel only offers some basic guidance here but there are cPanel Certified Professional System Administrators at who will be happy to assist you to get your server up an running as soon as possible.
    0
  • Gojko
    OK for DNS i understand. Is it possible to fix this mysql problem? Centos 7 rescue mode, well i tried one from link and took me 170$ without fixing problem, so i hire someone from upwork and he fix in 10 minutes (not this problem). i need this to cut expense because i already bought new server to transfer accounts
    0
  • andrew.n
    I'm sorry to see that you paid 170$ to somebody who didn't fix the problem by the end. Those sys admins who are cPanel certified are usually up to a standard.... Without having a closer look I'm not really sure why MySQL fails. Is there anything in MySQL logs? Either of these commands should work (starting MySQL as root or under mysql user): test -f /etc/sysconfig/mysql && source /etc/sysconfig/mysql; /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid ${MYSQLD_OPTS} test -f /etc/sysconfig/mysql && source /etc/sysconfig/mysql; /usr/sbin/mysqld --daemonize --user=mysql --log-error=/var/log/mysqld.log --pid file=/var/run/mysqld/mysqld.pid ${MYSQLD_OPTS} I know for sure as last week I recovered a server similar to yours from CentOS 7 using the above commands (MySQL started under mysql user)
    0
  • Gojko
    This is error log what show when i run command: 2020-10-12T17:36:23.559420Z 0 [Note] libgovernor.so found 2020-10-12T17:36:23.559476Z 0 [Note] All governors functions found too 2020-10-12T17:36:23.559493Z 0 [ERROR] Governor not connected 2020-10-12T17:36:23.559497Z 0 [Note] All governors lve functions found too 2020-10-12T17:36:23.559622Z 0 [ERROR] Governor LVE initialization error 2020-10-12T17:36:23.559724Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2020-10-12T17:36:23.559807Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.31-cll-lve) starting as process 31079 ... 2020-10-12T17:36:23.562164Z 0 [Note] InnoDB: PUNCH HOLE support available 2020-10-12T17:36:23.562179Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2020-10-12T17:36:23.562183Z 0 [Note] InnoDB: Uses event mutexes 2020-10-12T17:36:23.562186Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier 2020-10-12T17:36:23.562188Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2020-10-12T17:36:23.562193Z 0 [Note] InnoDB: Using Linux native AIO 2020-10-12T17:36:23.562347Z 0 [Note] InnoDB: Number of pools: 1 2020-10-12T17:36:23.562193Z 0 [Note] InnoDB: Using Linux native AIO 2020-10-12T17:36:23.562347Z 0 [Note] InnoDB: Number of pools: 1 2020-10-12T17:36:23.562424Z 0 [Note] InnoDB: Using CPU crc32 instructions 2020-10-12T17:36:23.570898Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2020-10-12T17:36:23.576286Z 0 [Note] InnoDB: Completed initialization of buffer pool 2020-10-12T17:36:23.577801Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2020-10-12T17:36:23.589019Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2020-10-12T17:36:23.639233Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2020-10-12T17:36:23.639276Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2020-10-12T17:36:23.660035Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2020-10-12T17:36:23.660706Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2020-10-12T17:36:23.660713Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2020-10-12T17:36:23.660969Z 0 [Note] InnoDB: Waiting for purge to start 2020-10-12T17:36:23.711192Z 0 [Note] InnoDB: 5.7.31 started; log sequence number 125081245467 2020-10-12T17:36:23.711372Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2020-10-12T17:36:23.711659Z 0 [Note] Plugin 'FEDERATED' is disabled. 2020-10-12T17:36:23.711747Z 0 [Note] InnoDB: Buffer pool(s) load completed at 201012 19:36:23 2020-10-12T17:36:23.712250Z 0 [ERROR] unknown option '--pid' 2020-10-12T17:36:23.712269Z 0 [ERROR] Aborting 2020-10-12T17:36:23.712295Z 0 [Note] Binlog end 2020-10-12T17:36:23.712357Z 0 [Note] Shutting down plugin 'ngram' 2020-10-12T17:36:23.712367Z 0 [Note] Shutting down plugin 'partition' 2020-10-12T17:36:23.712372Z 0 [Note] Shutting down plugin 'BLACKHOLE' 2020-10-12T17:36:23.712378Z 0 [Note] Shutting down plugin 'ARCHIVE' 2020-10-12T17:36:23.712383Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA' 2020-10-12T17:36:23.712477Z 0 [Note] Shutting down plugin 'MRG_MYISAM' 2020-10-12T17:36:23.712483Z 0 [Note] Shutting down plugin 'MyISAM' 2020-10-12T17:36:23.712498Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL' 2020-10-12T17:36:23.712507Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES' 2020-10-12T17:36:23.712515Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES' 2020-10-12T17:36:23.712522Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS' 2020-10-12T17:36:23.712530Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN' 2020-10-12T17:36:23.712536Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS' 2020-10-12T17:36:23.712543Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS' 2020-10-12T17:36:23.712549Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES' 2020-10-12T17:36:23.712557Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS' 2020-10-12T17:36:23.712566Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES' 2020-10-12T17:36:23.712573Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE' 2020-10-12T17:36:23.712580Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE' 2020-10-12T17:36:23.712586Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG' 2020-10-12T17:36:23.712614Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED' 2020-10-12T17:36:23.712629Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED' 2020-10-12T17:36:23.712636Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD' 2020-10-12T17:36:23.712648Z 0 [Note] Shutting down plugin 'INNODB_METRICS' 2020-10-12T17:36:23.712653Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO' 2020-10-12T17:36:23.712648Z 0 [Note] Shutting down plugin 'INNODB_METRICS' 2020-10-12T17:36:23.712653Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO' 2020-10-12T17:36:23.712658Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS' 2020-10-12T17:36:23.712663Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU' 2020-10-12T17:36:23.712668Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE' 2020-10-12T17:36:23.712673Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET' 2020-10-12T17:36:23.712677Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX' 2020-10-12T17:36:23.712682Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET' 2020-10-12T17:36:23.712687Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM' 2020-10-12T17:36:23.712692Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET' 2020-10-12T17:36:23.712696Z 0 [Note] Shutting down plugin 'INNODB_CMP' 2020-10-12T17:36:23.712701Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS' 2020-10-12T17:36:23.712706Z 0 [Note] Shutting down plugin 'INNODB_LOCKS' 2020-10-12T17:36:23.712711Z 0 [Note] Shutting down plugin 'INNODB_TRX' 2020-10-12T17:36:23.712716Z 0 [Note] Shutting down plugin 'InnoDB' 2020-10-12T17:36:23.712833Z 0 [Note] InnoDB: FTS optimize thread exiting. 2020-10-12T17:36:23.713006Z 0 [Note] InnoDB: Starting shutdown... 2020-10-12T17:36:23.813299Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool 2020-10-12T17:36:23.813790Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 201012 19:36:23 2020-10-12T17:36:25.342888Z 0 [Note] InnoDB: Shutdown completed; log sequence number 125081245486 2020-10-12T17:36:25.344958Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2020-10-12T17:36:25.344971Z 0 [Note] Shutting down plugin 'MEMORY' 2020-10-12T17:36:25.344976Z 0 [Note] Shutting down plugin 'CSV' 2020-10-12T17:36:25.344980Z 0 [Note] Shutting down plugin 'sha256_password' 2020-10-12T17:36:25.344983Z 0 [Note] Shutting down plugin 'mysql_native_password' 2020-10-12T17:36:25.345108Z 0 [Note] Shutting down plugin 'binlog' 2020-10-12T17:36:25.345296Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
    0
  • andrew.n
    2020-10-12T17:36:23.712250Z 0 [ERROR] unknown option '--pid' this is the reason. Did you have CloudLInux MySQL Governor installed?
    0
  • Gojko
    yes, i have sorry about that i didn't know that can be problem when everything is off
    0
  • Gojko
    ok so if this is not possible is it possible to copy all from /var/lib/mysql for databases and for files in /home/ to new installed server and that can work like that?
    0
  • andrew.n
    yes probably.
    0
  • cPanelBrianK
    Thank you for all your help and advice on this issue @andrew.n! Since MySQL-Governor is interfering with the rescue startup, copying over the datadir in its entirety would be the next best option @Gojko. It is important to keep in mind that with the complex structure of Innodb, you will need to copy the entire datadir. It is not advised that you attempt to restore individual files or overwrite existing MySQL files on the new host. It is also important to ensure that the same version of MySQL/MariaDB is installed on the destination server before attempting a startup with the copied datadir.
    0

Please sign in to leave a comment.