查看驱动器状态
sqlite3 /var/opt/scutech/dbackup3/backupd/media_pool_manager.db
sqlite> select * from drive;
禁用驱动器
sqlite> update drive set faulty=1 where id=1;
查看磁带状态
select id,changer_id,slot_number,media_tag,state,files,hex(media_pool_uuid) from media;
update drive set media_pool_uuid=null,media_id=null where changer_id=5;
查看磁带信息
select id,hex(media_pool_uuid) from media media_tag='000001L7';
设置磁带强制过期按钮
update media set media_pool_uuid=x'123456' where media_tag='000001L7';
sqlite3 /var/opt/scutech/dbackup3/backupd/media_pool_manager.db
sqlite> .head on
sqlite> select * from media;
sqlite> update media set state='blank' where media_tag='000001L7';
2023-10-23 18:59:51 INFO Job '文件 完全备份作业-备份至磁带池' (id 4a660988719311ee8000286ed49963d0, activity id 4a6743ca719311ee8000286ed49963d0) is started.
2023-10-23 18:59:51 DEBUG Spawned process 1860482 "lsscsi", cwd="(null)"
2023-10-23 18:59:51 DEBUG The process 1860482 exited with code 0
2023-10-23 18:59:51 DEBUG D2T websocket access data mode(auto)
2023-10-23 19:00:42 ERROR Failed to open client io: d574a616667511ee8000286ed49963d0/ca7c4e3ca5900001986e5a482ad065f0/ca7c4e3ca5900001986e5a482ad065f0.1.mtf, error=Invalid message state, {"reason":"Failed to open /832860e8719011ee8000286ed49963d0/d574a616667511ee8000286ed49963d0/ca7c4e3ca5900001986e5a482ad065f0/ca7c4e3ca5900001986e5a482ad065f0.1.mtf","state":"error"}
2023-10-23 19:00:42 ERROR Failed to write media
2023-10-23 19:00:42 ERROR Failed to execute backup task, last_error=-1
2023-10-23 19:01:42 ERROR Failed to receive WebSocket data from 10.118.3.228:50306, errno=104, Connection reset by peer
2023-10-23 19:01:42 ERROR Failed to close client io, error=Failed to received frame: Connection reset by peer
2023-10-23 19:01:43 ERROR Job '文件 完全备份作业-备份至磁带池' (id 4a660988719311ee8000286ed49963d0, activity id 4a6743ca719311ee8000286ed49963d0) failed.
FVARK-ARKR330:markr012:3306 master > mysqlbinlog /u01/3306/mylog/mysql-bin/4bfa8d09614cb84faffcb3eccd5d244e/mysql-bin.000008 --start-position=156
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 125
#231023 15:18:30 server id 102407833 end_log_pos 125 CRC32 0xddc98598 Start: binlog v 4, server v 8.0.23 created 231023 15:18:30
BINLOG '
Rh42ZQ+ZnhoGeQAAAH0AAAAAAAQAOC4wLjIzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEwANAAgAAAAABAAEAAAAYQAEGggAAAAICAgCAAAACgoKKioAEjQA
CigBmIXJ3Q==
'/*!*/;
# at 196
#231023 15:19:53 server id 102407833 end_log_pos 273 CRC32 0xb29fbf6e GTID last_committed=0 sequence_number=1 rbr_only=no original_committed_timestamp=1698045593122435 immediate_commit_timestamp=1698045593122435 transaction_length=190
# original_commit_timestamp=1698045593122435 (2023-10-23 15:19:53.122435 CST)
# immediate_commit_timestamp=1698045593122435 (2023-10-23 15:19:53.122435 CST)
/*!80001 SET @@session.original_commit_timestamp=1698045593122435*//*!*/;
/*!80014 SET @@session.original_server_version=80023*//*!*/;
/*!80014 SET @@session.immediate_server_version=80023*//*!*/;
SET @@SESSION.GTID_NEXT= 'bbc6147e-6bd0-11ee-b4de-286ed4991d57:56'/*!*/;
# at 273
#231023 15:19:53 server id 102407833 end_log_pos 386 CRC32 0x39c785d3 Query thread_id=419368 exec_time=0 error_code=0 Xid = 846982
use `xxl_wd`/*!*/;
SET TIMESTAMP=1698045593/*!*/;
SET @@session.pseudo_thread_id=419368/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1168637952/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb4 *//*!*/;
SET @@session.character_set_client=46,@@session.collation_connection=46,@@session.collation_server=46/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
/*!80011 SET @@session.default_collation_for_utf8mb4=255*//*!*/;
truncate table s_learnrecord_day
/*!*/;
# at 386
#231023 15:20:08 server id 102407833 end_log_pos 463 CRC32 0x81c36e58 GTID last_committed=1 sequence_number=2 rbr_only=no original_committed_timestamp=1698045608486953 immediate_commit_timestamp=1698045608486953 transaction_length=189
# original_commit_timestamp=1698045608486953 (2023-10-23 15:20:08.486953 CST)
# immediate_commit_timestamp=1698045608486953 (2023-10-23 15:20:08.486953 CST)
/*!80001 SET @@session.original_commit_timestamp=1698045608486953*//*!*/;
/*!80014 SET @@session.original_server_version=80023*//*!*/;
/*!80014 SET @@session.immediate_server_version=80023*//*!*/;
SET @@SESSION.GTID_NEXT= 'bbc6147e-6bd0-11ee-b4de-286ed4991d57:57'/*!*/;
# at 463
#231023 15:20:08 server id 102407833 end_log_pos 575 CRC32 0xe88816b2 Query thread_id=419368 exec_time=0 error_code=0 Xid = 847015
SET TIMESTAMP=1698045608/*!*/;
truncate table qrtz_job_details
/*!*/;
# at 575
#231023 15:20:27 server id 102407833 end_log_pos 652 CRC32 0x6295dcc9 GTID last_committed=2 sequence_number=3 rbr_only=no original_committed_timestamp=1698045627840436 immediate_commit_timestamp=1698045627840436 transaction_length=185
# original_commit_timestamp=1698045627840436 (2023-10-23 15:20:27.840436 CST)
# immediate_commit_timestamp=1698045627840436 (2023-10-23 15:20:27.840436 CST)
/*!80001 SET @@session.original_commit_timestamp=1698045627840436*//*!*/;
/*!80014 SET @@session.original_server_version=80023*//*!*/;
/*!80014 SET @@session.immediate_server_version=80023*//*!*/;
SET @@SESSION.GTID_NEXT= 'bbc6147e-6bd0-11ee-b4de-286ed4991d57:58'/*!*/;
# at 652
#231023 15:20:27 server id 102407833 end_log_pos 760 CRC32 0xa4576c9e Query thread_id=419368 exec_time=0 error_code=0 Xid = 847054
SET TIMESTAMP=1698045627/*!*/;
truncate table tbl_homework
/*!*/;
# at 760
#231023 15:32:29 server id 102407833 end_log_pos 837 CRC32 0x6780e4e0 GTID last_committed=3 sequence_number=4 rbr_only=no original_committed_timestamp=1698046349857322 immediate_commit_timestamp=1698046349857322 transaction_length=222
# original_commit_timestamp=1698046349857322 (2023-10-23 15:32:29.857322 CST)
# immediate_commit_timestamp=1698046349857322 (2023-10-23 15:32:29.857322 CST)
/*!80001 SET @@session.original_commit_timestamp=1698046349857322*//*!*/;
/*!80014 SET @@session.original_server_version=80023*//*!*/;
/*!80014 SET @@session.immediate_server_version=80023*//*!*/;
SET @@SESSION.GTID_NEXT= 'bbc6147e-6bd0-11ee-b4de-286ed4991d57:59'/*!*/;
# at 837
#231023 15:32:29 server id 102407833 end_log_pos 982 CRC32 0xcf845812 Query thread_id=420003 exec_time=0 error_code=0 Xid = 848507
use `dingjia_db`/*!*/;
SET TIMESTAMP=1698046349/*!*/;
SET @@session.pseudo_thread_id=420003/*!*/;
DROP TABLE `table_dj` /* generated by server */
/*!*/;
SET @@SESSION.GTID_NEXT= 'AUTOMATIC' /* added by mysqlbinlog */ /*!*/;
DELIMITER ;
# End of log file
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
FVARK-ARKR330:markr012:3306 master >
哈哈哈,写的太好了https://www.cscnn.com/
怎么收藏这篇文章?