recovery

How do you restore a corrupted object in a git repository (for newbies)?

我是研究僧i 提交于 2019-11-26 18:12:58
问题 I tried to open my repository today and it came up with no commit history. Everything I tried (git status, git log, git checkout...) threw an error about a corrupt object. I researched this problem online and found the article by Linus Torvalds, but got lost at the point where he found the broken link ID: none of my file IDs, tree or blob, match the culprit ID thrown by the error message. I then returned to the article on recovering "git objects damaged by hard disk failure" and (after moving

FastBoot 刷机使用方法

泄露秘密 提交于 2019-11-26 16:52:15
极力推荐Android 开发大总结文章:欢迎收藏 程序员Android 力荐 ,Android 开发者需要的必备技能 本篇文章主要介绍 Android 开发中的部分知识点,通过阅读本篇文章,您将收获以下内容: 一、Fastboot 简介 二、Fastboot 刷机准备 三、Fastboot 刷机命令 四、其他刷机工具 一、Fastboot 简介 在安卓手机中 Fastboot 是一种比 recovery 更底层的刷机模式(俗称引导模式)。就是使用 USB 数据线连接手机的一种刷机模式。相对于 Recovery 、Fota等卡刷来说,线刷更可靠,安全。 二、Fastboot 刷机准备 解锁 BootLoader 使用 Fastboot 刷机必须先解锁 BootLoader ,否则无法刷机。解锁 BootLoader 的方法是在开发者模式中开起 OEM unlocking 开关。如开发者模式隐藏,请进入 Settings -- System -- About Phone --多次点击 build number 即可打开隐藏的开发者模式。 三、Fastboot 刷机命令 1.进入Fastboot 模式 一般手机常用 Power 跟 音量+ 进入 fastboot mode 首先解锁设备 开发者模式打开 oem 开关后,连接 USB ,对设备进行解锁 解锁命令如下: fastboot

三、sbin/recovery/服务流程-recovery.cpp main方法

。_饼干妹妹 提交于 2019-11-26 15:58:58
三、sbin/recovery/服务流程-recovery.cpp main方法 本次将分析recovery.cpp main方法,其中会介绍一部分C++ 基础,话不多说,直接开始,我们都知道从bootloder引导分区后会判断misc的参数,如果是boot-recovery ,会驱动进入recovery模式,这部分后面会进行补充,暂时对主要流程进行二次分析 1、加载分区表 2、get_args 3、加载selinux 4、关于路径转换解析 5、执行传入参数命令 6、finish_recovery 那么首先其实跟system的启动相同,会执行内核的init.rc etc/init.rc: service recovery /sbin/recovery seclabel u:r:recovery:s0 直接去启动recovery服务,这个文件是编译在recovey/sbin下的可执行文件,我们开启main方法之旅 //argc和argv参数在用命令行编译程序时有用。main( int argc, char* argv[], char **env ) 中 //第一个参数,int型的argc,为整型,用来统计程序运行时发送给main函数的命令行参数的个数 //第二个参数,char*型的argv[],为字符串数组,用来存放指向的字符串参数的指针数组 //首先我们看到mian

Hadoop NodeManager 无法启动

妖精的绣舞 提交于 2019-11-26 12:30:13
一、问题描述 日志文件信息如下: 2019-07-18 11:20:28,104 INFO nodemanager.NodeManager (LogAdapter.java:info(45)) - registered UNIX signal handlers for [TERM, HUP, INT] 2019-07-18 11:20:29,069 INFO recovery.NMLeveldbStateStoreService (NMLeveldbStateStoreService.java:openDatabase(963)) - Using state database at /var/log/hadoop-yarn/nodemanager/recovery-state/yarn-nm-state for recovery 2019-07-18 11:20:29,103 INFO service.AbstractService (AbstractService.java:noteFailure(272)) - Service org.apache.hadoop.yarn.server.nodemanager.recovery.NMLeveldbStateStoreService failed in state INITED; cause: org.fusesource

Virtual Box下进入MacOS虚拟机Recovery模式并修改VirtualBox中MacOS虚拟机的分辨率

笑着哭i 提交于 2019-11-26 10:22:16
前言 为了避免root用户随意更改Mac硬盘里面的文件,从El Capitan 10.11开始Mac添加了Mac SIP系统完整性保护。但是因为启用了这个功能,那么在虚拟机里面安装的Mac想要修改分辨率将无法实现,所以首先要关闭这个功能。而Mac系统只能在安全模式下才能关闭这个系统,因此,我们首先要进入Mac的Recovery模式。 Virtual Box 下进入Recovery 模式 开启虚拟机的Mac系统,USB键盘按 Windows+R 进虚拟机的BIOS系统,选择 Boot Maintenance Manager 。 点击 Boot From File 选项。 点进去第一个EFI是默认的启动方式,而另外两个启动模式由于都是乱码所以要一个个试试,找到那个点进去有 <com.apple.recovery.boot> 这个启动项的那个,不是的按 Esc 就可以退出了,我的是第三个选项点进去有recovery模式。 选择**<com.apple.recovery.boot> 选项 选择 boot.efi**就可以在Virtual Box中进入MacOS虚拟机的Recovery模式。 关闭IPS系统保护 等到屏幕出现苹果过后,画面会进入语言选择界面,选择 以简体中文作为主要语言 就好。 选择实用 工具 → 终端 ,打开终端。 在终端输入命令: csrutil disable

How to recover MySQL database from .myd, .myi, .frm files

ぐ巨炮叔叔 提交于 2019-11-26 00:50:55
问题 How to restore one of my MySQL databases from .myd , .myi , .frm files? 回答1: If these are MyISAM tables, then plopping the .FRM, .MYD, and .MYI files into a database directory (e.g., /var/lib/mysql/dbname ) will make that table available. It doesn't have to be the same database as they came from, the same server, the same MySQL version, or the same architecture. You may also need to change ownership for the folder (e.g., chown -R mysql:mysql /var/lib/mysql/dbname ) Note that permissions (

postgresql 主备及切换-恢复方案

浪尽此生 提交于 2019-11-25 23:53:32
前言 前期的gitlab 已经开始推广测试,最近对postgresql 做了主备,这里说下方案及在实施过程中遇到的坑。 postgresql 的具安装不在此介绍。 基础信息 primary_ip: 192.168.10.2, standby_ip: 192.168.10.3, PGDATA: /opt/gitlab/postgresql/data, postgresql_version:(PostgreSQL) 9.6.8, PGCONF_DIR: $PGDATA, 涉及修改的配置文件有: postgresql.conf --------- postgresql 主配置文件 pg_hba.conf ------------- postgresql 访问规则文件 recovery.conf ----------- postgresql 备库访问主库配置文件 注意事项! 1. 主备postgresql 版本需保持一致! 2. postgresql.conf 配置文件需保持一致! 3. 备库提权为主库后,切记不要直接启动原主库! 准备操作 在primary 192.168.10.2 主机操作 1.为备库准备主库,修改配置文件 cat postgresql.conf wal_level = hot_standby # minimal, replica, or logical max_wal

PostgreSQL pg_ctl start超时分析

陌路散爱 提交于 2019-11-25 23:52:48
一、问题 pg_ctl start启动时报错退出:pg_ctl:server did not start in time。超时时间是多少?从什么时候到哪个阶段算超时? 二、分析:该信息打印位置,从后面代码段do_start函数中可以看出 1、pg_ctl start调用start_postmaster启动PG的主进程后,每隔0.1ms检查一次postmaster.pid文件,是否已写入ready/standby 2、总共会检查600次,即从启动主进程后,最多等待60s,如果没有写入ready/standby则打印上述日志并退出 3、默认等待时间是60s,如果pg_ctl start -t指定等待时间,则等待时间为该指定时间 三、什么时候postmaster.pid文件写入ready/standby 1、如果是主机不管有没有设置hot standby 1)当startup进程恢复完成退出时,调用proc_exit函数向主进程发送SIGCHLD信号并退出 2)主进程接收到信号后,signal处理函数reaper调用AddToDataDirLockFile向postmaster.pid文件写入ready 2、如果是备机即data目录下有recovery.cnf文件,且设置了hot standby,在实际恢复前没有到达一致性位置 1)startup进程向主进程发送PMSIGNAL

How to recover a dropped stash in Git?

随声附和 提交于 2019-11-25 22:00:20
问题 I frequently use git stash and git stash pop to save and restore changes in my working tree. Yesterday I had some changes in my working tree that I had stashed and popped, and then I made more changes to my working tree. I\'d like to go back and review yesterday\'s stashed changes, but git stash pop appears to remove all references to the associated commit. I know that if I use git stash then .git/refs/stash contains the reference of the commit used to create the stash. And .git/logs/refs

How to recover MySQL database from .myd, .myi, .frm files

最后都变了- 提交于 2019-11-25 20:25:05
How to restore one of my MySQL databases from .myd , .myi , .frm files? If these are MyISAM tables, then plopping the .FRM, .MYD, and .MYI files into a database directory (e.g., /var/lib/mysql/dbname ) will make that table available. It doesn't have to be the same database as they came from, the same server, the same MySQL version, or the same architecture. You may also need to change ownership for the folder (e.g., chown -R mysql:mysql /var/lib/mysql/dbname ) Note that permissions ( GRANT , etc.) are part of the mysql database. So they won't be restored along with the tables; you may need to