X7ROOT File Manager
Current Path:
/usr/sbin
usr
/
sbin
/
π
..
π
ModemManager
(1.19 MB)
π
NetworkManager
(2.83 MB)
π
abrt-auto-reporting
(10.98 KB)
π
abrt-configuration
(31.66 KB)
π
abrt-dbus
(31.22 KB)
π
abrt-harvest-pstoreoops
(1.32 KB)
π
abrt-harvest-vmcore
(8.19 KB)
π
abrt-install-ccpp-hook
(2.85 KB)
π
abrt-server
(31.11 KB)
π
abrtd
(31.22 KB)
π
accept
(10.95 KB)
π
accessdb
(11.55 KB)
π
accton
(11.19 KB)
π
activate-devpay
(15.04 KB)
π
addgnupghome
(3.05 KB)
π
addpart
(19.69 KB)
π
adduser
(134.39 KB)
π
agetty
(48.48 KB)
π
alsa-info
(28.09 KB)
π
alsa-info.sh
(28.09 KB)
π
alsabat-test.sh
(4.04 KB)
π
alsactl
(99.15 KB)
π
alternatives
(27.61 KB)
π
amaddclient
(15.02 KB)
π
amadmin
(55.69 KB)
π
amaespipe
(3.29 KB)
π
amandad
(35.36 KB)
π
amarchiver
(15.3 KB)
π
amcheck
(63.25 KB)
π
amcheckdb
(1.79 KB)
π
amcheckdump
(14.25 KB)
π
amcleanup
(6.21 KB)
π
amcleanupdisk
(4.16 KB)
π
amcrypt
(1.02 KB)
π
amcrypt-ossl
(3.12 KB)
π
amcrypt-ossl-asym
(6.8 KB)
π
amcryptsimple
(4.55 KB)
π
amdevcheck
(4.51 KB)
π
amdump
(10.46 KB)
π
amfetchdump
(26.87 KB)
π
amflush
(27.13 KB)
π
amgetconf
(12.24 KB)
π
amgpgcrypt
(2.68 KB)
π
amlabel
(11.22 KB)
π
amoverview
(6.42 KB)
π
amplot
(5.94 KB)
π
amreport
(17.65 KB)
π
amrestore
(12.7 KB)
π
amrmtape
(8.91 KB)
π
amserverconfig
(20.99 KB)
π
amservice
(19.16 KB)
π
amstatus
(49.23 KB)
π
amtape
(19.47 KB)
π
amtapetype
(22.56 KB)
π
amtoc
(7.54 KB)
π
amvault
(29.59 KB)
π
anaconda
(54.99 KB)
π
anacron
(35.52 KB)
π
apachectl
(4.19 KB)
π
applygnupgdefaults
(2.21 KB)
π
arp
(63.98 KB)
π
arpd
(52.98 KB)
π
arping
(23.19 KB)
π
atd
(27.17 KB)
π
atrun
(67 B)
π
attrd_updater
(16.52 KB)
π
audispd
(39.75 KB)
π
auditctl
(39.56 KB)
π
auditd
(125.65 KB)
π
augenrules
(3.7 KB)
π
aureport
(105.39 KB)
π
ausearch
(109.8 KB)
π
authconfig
(43.49 KB)
π
authconfig-tui
(43.49 KB)
π
autrace
(15.49 KB)
π
avahi-daemon
(133.04 KB)
π
avcstat
(11.25 KB)
π
badblocks
(27.69 KB)
π
biosdecode
(24.15 KB)
π
biosdevname
(36.57 KB)
π
blkdeactivate
(15.97 KB)
π
blkdiscard
(23.84 KB)
π
blkid
(77.92 KB)
π
blkmapd
(43.81 KB)
π
blockdev
(32.2 KB)
π
brctl
(32.13 KB)
π
bridge
(77.61 KB)
π
btrfs
(690.59 KB)
π
btrfs-convert
(378.62 KB)
π
btrfs-debug-tree
(354.23 KB)
π
btrfs-find-root
(346.22 KB)
π
btrfs-image
(374.63 KB)
π
btrfs-map-logical
(350.27 KB)
π
btrfs-select-super
(346.2 KB)
π
btrfs-zero-log
(346.2 KB)
π
btrfsck
(690.59 KB)
π
btrfstune
(350.24 KB)
π
build-locale-archive
(860.52 KB)
π
cacertdir_rehash
(644 B)
π
cache_check
(1.23 MB)
π
cache_dump
(1.23 MB)
π
cache_metadata_size
(1.23 MB)
π
cache_repair
(1.23 MB)
π
cache_restore
(1.23 MB)
π
cache_writeback
(1.23 MB)
π
capsh
(19.43 KB)
π
cbq
(32.73 KB)
π
cfdisk
(71.37 KB)
π
cgdisk
(176.87 KB)
π
chat
(27.3 KB)
π
chcpu
(23.7 KB)
π
chgpasswd
(64.1 KB)
π
chkconfig
(40.22 KB)
π
chpasswd
(55.88 KB)
π
chronyd
(263.08 KB)
π
chroot
(32.48 KB)
π
cibadmin
(27.2 KB)
π
cifs.idmap
(15.07 KB)
π
cifs.upcall
(31.23 KB)
π
clamd
(208.18 KB)
π
clamonacc
(200.67 KB)
π
clock
(48.44 KB)
π
clockdiff
(19.04 KB)
π
consoletype
(6.95 KB)
π
convertquota
(70.88 KB)
π
corosync
(284.76 KB)
π
corosync-cfgtool
(14.97 KB)
π
corosync-cmapctl
(23.31 KB)
π
corosync-cpgtool
(11 KB)
π
corosync-keygen
(11.12 KB)
π
corosync-notifyd
(33.63 KB)
π
corosync-quorumtool
(23.16 KB)
π
cracklib-check
(7.04 KB)
π
cracklib-format
(246 B)
π
cracklib-packer
(11.06 KB)
π
cracklib-unpacker
(7.02 KB)
π
crda
(11.34 KB)
π
create-cracklib-dict
(990 B)
π
crm_attribute
(21.51 KB)
π
crm_diff
(16.73 KB)
π
crm_error
(11.48 KB)
π
crm_failcount
(6.56 KB)
π
crm_master
(2.37 KB)
π
crm_mon
(84.05 KB)
π
crm_node
(24.93 KB)
π
crm_report
(15.9 KB)
π
crm_resource
(112.09 KB)
π
crm_shadow
(21.02 KB)
π
crm_simulate
(50.68 KB)
π
crm_standby
(3.33 KB)
π
crm_ticket
(31.15 KB)
π
crm_verify
(16.38 KB)
π
crmadmin
(21.1 KB)
π
crond
(68.48 KB)
π
cryptsetup
(85.41 KB)
π
ctrlaltdel
(11.2 KB)
π
ctstat
(20.09 KB)
π
cups-browsed
(136.9 KB)
π
cups-genppd.5.2
(56.05 KB)
π
cups-genppdupdate
(34.2 KB)
π
cupsaccept
(10.95 KB)
π
cupsaddsmb
(10.98 KB)
π
cupsctl
(14.97 KB)
π
cupsd
(427.17 KB)
π
cupsdisable
(10.95 KB)
π
cupsenable
(10.95 KB)
π
cupsfilter
(27.37 KB)
π
cupsreject
(10.95 KB)
π
dcbtool
(60.03 KB)
π
ddns-confgen
(19.44 KB)
π
debugfs
(120.65 KB)
π
delpart
(19.69 KB)
π
depmod
(143.24 KB)
π
devlink
(64.72 KB)
π
dhclient
(414.34 KB)
π
dhclient-script
(30.38 KB)
π
dm_dso_reg_tool
(11.29 KB)
π
dmevent_tool
(11.29 KB)
π
dmeventd
(39.56 KB)
π
dmfilemapd
(19.16 KB)
π
dmidecode
(120.2 KB)
π
dmraid
(22.1 KB)
π
dmraid.static
(22.1 KB)
π
dmsetup
(149.2 KB)
π
dmstats
(149.2 KB)
π
dnsmasq
(340.79 KB)
π
dnssec-checkds
(922 B)
π
dnssec-coverage
(924 B)
π
dnssec-dsfromkey
(56.6 KB)
π
dnssec-importkey
(52.59 KB)
π
dnssec-keyfromlabel
(60.52 KB)
π
dnssec-keygen
(64.55 KB)
π
dnssec-keymgr
(920 B)
π
dnssec-revoke
(48.46 KB)
π
dnssec-settime
(56.52 KB)
π
dnssec-signzone
(105.71 KB)
π
dnssec-verify
(48.47 KB)
π
dosfsck
(56.24 KB)
π
dosfslabel
(52.23 KB)
π
dovecot
(88.1 KB)
π
dracut
(55.83 KB)
π
dump-acct
(19.63 KB)
π
dump-utmp
(15.47 KB)
π
dumpe2fs
(23.62 KB)
π
e2freefrag
(11.15 KB)
π
e2fsck
(250.55 KB)
π
e2image
(27.85 KB)
π
e2label
(69.41 KB)
π
e2undo
(11.32 KB)
π
e4defrag
(23.55 KB)
π
eapol_test
(1.77 MB)
π
ebtables
(6.85 KB)
π
ebtables-restore
(10.88 KB)
π
ebtables-save
(851 B)
π
editmap.sendmail
(95.55 KB)
π
edquota
(83.09 KB)
π
era_check
(1.23 MB)
π
era_dump
(1.23 MB)
π
era_invalidate
(1.23 MB)
π
era_restore
(1.23 MB)
π
ether-wake
(73.26 KB)
π
ethtool
(293.87 KB)
π
eventlogadm
(39.17 KB)
π
exportfs
(76.91 KB)
π
faillock
(15.02 KB)
π
fancontrol
(14.01 KB)
π
fatlabel
(52.23 KB)
π
fcgistarter
(11 KB)
π
fcgiwrap
(19.8 KB)
π
fcnsq
(15.13 KB)
π
fcoeadm
(48.52 KB)
π
fcoemon
(69.21 KB)
π
fcping
(31.52 KB)
π
fcrls
(19.16 KB)
π
fdformat
(11.27 KB)
π
fdisk
(195.8 KB)
π
fence_amt_ws
(8.77 KB)
π
fence_apc
(7.49 KB)
π
fence_apc_snmp
(6.28 KB)
π
fence_bladecenter
(3.09 KB)
π
fence_brocade
(2.45 KB)
π
fence_cisco_mds
(2.62 KB)
π
fence_cisco_ucs
(5.53 KB)
π
fence_compute
(16.43 KB)
π
fence_drac5
(5 KB)
π
fence_eaton_snmp
(6.66 KB)
π
fence_emerson
(1.85 KB)
π
fence_eps
(3.52 KB)
π
fence_evacuate
(13 KB)
π
fence_heuristics_ping
(5.78 KB)
π
fence_hpblade
(3.66 KB)
π
fence_ibmblade
(1.96 KB)
π
fence_idrac
(6.5 KB)
π
fence_ifmib
(3.18 KB)
π
fence_ilo
(4.42 KB)
π
fence_ilo2
(4.42 KB)
π
fence_ilo3
(6.5 KB)
π
fence_ilo3_ssh
(2.03 KB)
π
fence_ilo4
(6.5 KB)
π
fence_ilo4_ssh
(2.03 KB)
π
fence_ilo5
(6.5 KB)
π
fence_ilo5_ssh
(2.03 KB)
π
fence_ilo_moonshot
(1.56 KB)
π
fence_ilo_mp
(1.29 KB)
π
fence_ilo_ssh
(2.03 KB)
π
fence_imm
(6.5 KB)
π
fence_intelmodular
(2.43 KB)
π
fence_ipdu
(3.86 KB)
π
fence_ipmilan
(6.5 KB)
π
fence_kdump
(23.4 KB)
π
fence_mpath
(9.98 KB)
π
fence_redfish
(5.34 KB)
π
fence_rhevm
(6.4 KB)
π
fence_rsa
(1.76 KB)
π
fence_rsb
(2.22 KB)
π
fence_sbd
(11.11 KB)
π
fence_scsi
(15.95 KB)
π
fence_virt
(57.66 KB)
π
fence_vmware_rest
(5.61 KB)
π
fence_vmware_soap
(8.44 KB)
π
fence_wti
(7.53 KB)
π
fence_xvm
(57.66 KB)
π
filefrag
(15.23 KB)
π
findfs
(11.2 KB)
π
fipvlan
(40.16 KB)
π
firewalld
(6.87 KB)
π
firstboot
(6.45 KB)
π
fixfiles
(11.03 KB)
π
fixparts
(61.65 KB)
π
fsadm
(23.97 KB)
π
fsck
(32.12 KB)
π
fsck.btrfs
(1.16 KB)
π
fsck.cramfs
(19.57 KB)
π
fsck.ext2
(250.55 KB)
π
fsck.ext3
(250.55 KB)
π
fsck.ext4
(250.55 KB)
π
fsck.fat
(56.24 KB)
π
fsck.minix
(73.32 KB)
π
fsck.msdos
(56.24 KB)
π
fsck.vfat
(56.24 KB)
π
fsck.xfs
(433 B)
π
fsfreeze
(11.23 KB)
π
fstrim
(40.59 KB)
π
ftpscrub
(16.47 KB)
π
ftpshut
(10.98 KB)
π
fuser
(32.34 KB)
π
fxload
(19.26 KB)
π
gdisk
(184.49 KB)
π
gdm
(430.45 KB)
π
genhomedircon
(23.77 KB)
π
genhostid
(6.94 KB)
π
genl
(52.81 KB)
π
genl-ctrl-list
(11.27 KB)
π
genrandom
(11.16 KB)
π
getcap
(11.13 KB)
π
getenforce
(7.01 KB)
π
getpcaps
(7.07 KB)
π
getsebool
(11.13 KB)
π
glibc_post_upgrade.i686
(700.2 KB)
π
glibc_post_upgrade.x86_64
(772.05 KB)
π
gluster
(465.84 KB)
π
groupadd
(85.65 KB)
π
groupdel
(77.38 KB)
π
groupmems
(55.97 KB)
π
groupmod
(85.66 KB)
π
grpck
(59.93 KB)
π
grpconv
(51.73 KB)
π
grpunconv
(51.73 KB)
π
grub2-bios-setup
(1.03 MB)
π
grub2-get-kernel-settings
(2.08 KB)
π
grub2-install
(1.28 MB)
π
grub2-macbless
(1.01 MB)
π
grub2-mkconfig
(7.63 KB)
π
grub2-ofpathname
(225.54 KB)
π
grub2-probe
(1.03 MB)
π
grub2-reboot
(4 KB)
π
grub2-rpm-sort
(258.52 KB)
π
grub2-set-default
(3.46 KB)
π
grub2-setpassword
(2.96 KB)
π
grub2-sparc64-setup
(1.03 MB)
π
grubby
(71.27 KB)
π
gssproxy
(130.64 KB)
π
halt
(704.8 KB)
π
handle-sshpw
(2.35 KB)
π
hardlink
(15.29 KB)
π
htcacheclean
(31.16 KB)
π
httpd
(511.44 KB)
π
hwclock
(48.44 KB)
π
hwloc-dump-hwdata
(15.32 KB)
π
hypervfcopyd
(11.18 KB)
π
hypervkvpd
(27.38 KB)
π
hypervvssd
(15.23 KB)
π
iconvconfig
(22.15 KB)
π
iconvconfig.i686
(21.44 KB)
π
iconvconfig.x86_64
(22.15 KB)
π
ifcfg
(2.99 KB)
π
ifconfig
(80.05 KB)
π
ifdown
(1.61 KB)
π
ifenslave
(19.74 KB)
π
ifstat
(40.6 KB)
π
ifup
(4.89 KB)
π
in.proftpd
(988.23 KB)
π
init
(1.56 MB)
π
insmod
(143.24 KB)
π
install-info
(110.42 KB)
π
installkernel
(2.69 KB)
π
intel-microcode2ucode
(11.1 KB)
π
ip
(459.59 KB)
π
ip6tables
(91.52 KB)
π
ip6tables-restore
(91.52 KB)
π
ip6tables-save
(91.52 KB)
π
ipmaddr
(19.33 KB)
π
ipmievd
(488.98 KB)
π
iprconfig
(394.37 KB)
π
iprdbg
(135.94 KB)
π
iprdump
(123.67 KB)
π
iprinit
(123.64 KB)
π
iprsos
(2.18 KB)
π
iprupdate
(123.64 KB)
π
ipsec
(14.96 KB)
π
ipset
(7.02 KB)
π
iptables
(91.52 KB)
π
iptables-restore
(91.52 KB)
π
iptables-save
(91.52 KB)
π
iptunnel
(23.33 KB)
π
irqbalance
(48.5 KB)
π
isadump
(15.02 KB)
π
isaset
(10.98 KB)
π
isc-hmac-fixup
(11.2 KB)
π
iscsi-iname
(11.01 KB)
π
iscsiadm
(794.39 KB)
π
iscsid
(819.81 KB)
π
iscsistart
(361.05 KB)
π
iscsiuio
(182.09 KB)
π
iso8601
(16.04 KB)
π
iw
(157.97 KB)
π
jk_check
(11.2 KB)
π
jk_chrootlaunch
(20.77 KB)
π
jk_chrootsh
(32.73 KB)
π
jk_cp
(4.12 KB)
π
jk_init
(9.68 KB)
π
jk_jailuser
(11.81 KB)
π
jk_list
(4.93 KB)
π
jk_lsh
(24.66 KB)
π
jk_socketd
(29.05 KB)
π
jk_update
(9.11 KB)
π
kexec
(166.06 KB)
π
key.dns_resolver
(19.45 KB)
π
killall5
(23.17 KB)
π
kpartx
(39.47 KB)
π
kpatch
(14.53 KB)
π
ksmtuned
(3.36 KB)
π
lchage
(15.41 KB)
π
ldattach
(27.93 KB)
π
ldconfig
(952.08 KB)
π
ledctl
(61.97 KB)
π
ledmon
(62.15 KB)
π
lgroupadd
(11.28 KB)
π
lgroupdel
(11.26 KB)
π
lgroupmod
(15.44 KB)
π
libvirtd
(506.11 KB)
π
lid
(15.4 KB)
π
liveinst
(5.83 KB)
π
lldpad
(402.72 KB)
π
lldptool
(96.02 KB)
π
lnewusers
(15.46 KB)
π
lnstat
(20.09 KB)
π
load_policy
(10.97 KB)
π
loaderinfo
(40.91 KB)
π
lockdev
(10.95 KB)
π
logrotate
(68.61 KB)
π
logsave
(11.27 KB)
π
losetup
(82.45 KB)
π
lpadmin
(27.09 KB)
π
lpasswd
(15.5 KB)
π
lpc
(15.07 KB)
π
lpc.cups
(15.07 KB)
π
lpinfo
(14.96 KB)
π
lpmove
(10.98 KB)
π
lsmod
(143.24 KB)
π
lsof
(150.57 KB)
π
lspci
(73.67 KB)
π
luseradd
(15.38 KB)
π
luserdel
(11.3 KB)
π
lusermod
(19.43 KB)
π
lvchange
(2.15 MB)
π
lvconvert
(2.15 MB)
π
lvcreate
(2.15 MB)
π
lvdisplay
(2.15 MB)
π
lvextend
(2.15 MB)
π
lvm
(2.15 MB)
π
lvmconf
(12.55 KB)
π
lvmconfig
(2.15 MB)
π
lvmdiskscan
(2.15 MB)
π
lvmdump
(10.07 KB)
π
lvmetad
(71.66 KB)
π
lvmpolld
(64.07 KB)
π
lvmsadc
(2.15 MB)
π
lvmsar
(2.15 MB)
π
lvreduce
(2.15 MB)
π
lvremove
(2.15 MB)
π
lvrename
(2.15 MB)
π
lvresize
(2.15 MB)
π
lvs
(2.15 MB)
π
lvscan
(2.15 MB)
π
lwresd
(768.03 KB)
π
mailstats
(79.11 KB)
π
makedumpfile
(376.52 KB)
π
makemap.sendmail
(95.63 KB)
π
matchpathcon
(11.19 KB)
π
mcelog
(152.67 KB)
π
mdadm
(593.45 KB)
π
mdmon
(331.55 KB)
π
mii-diag
(20.08 KB)
π
mii-tool
(19.51 KB)
π
milter-greylist
(253.3 KB)
π
mkdict
(246 B)
π
mkdosfs
(28.05 KB)
π
mkdumprd
(13.99 KB)
π
mke2fs
(94.08 KB)
π
mkfs
(11.25 KB)
π
mkfs.btrfs
(366.45 KB)
π
mkfs.cramfs
(36.16 KB)
π
mkfs.ext2
(94.08 KB)
π
mkfs.ext3
(94.08 KB)
π
mkfs.ext4
(94.08 KB)
π
mkfs.fat
(28.05 KB)
π
mkfs.minix
(36.27 KB)
π
mkfs.msdos
(28.05 KB)
π
mkfs.vfat
(28.05 KB)
π
mkfs.xfs
(359.8 KB)
π
mkhomedir_helper
(19.05 KB)
π
mklost+found
(11.11 KB)
π
mkswap
(69.64 KB)
π
modinfo
(143.24 KB)
π
modprobe
(143.24 KB)
π
mount.cifs
(40.05 KB)
π
mount.fuse
(11.1 KB)
π
mount.nfs
(114.68 KB)
π
mount.nfs4
(114.68 KB)
π
mountstats
(40.59 KB)
π
mpathconf
(10.6 KB)
π
mpathpersist
(27.91 KB)
π
mtr
(83.18 KB)
π
mtx
(49.87 KB)
π
multipath
(22.99 KB)
π
multipathd
(84.37 KB)
π
named
(768.03 KB)
π
named-checkconf
(32.25 KB)
π
named-checkzone
(32.06 KB)
π
named-compilezone
(32.06 KB)
π
named-journalprint
(11.13 KB)
π
nameif
(15.32 KB)
π
netreport
(10.96 KB)
π
netscsid
(19.55 KB)
π
new-kernel-pkg
(24.96 KB)
π
newusers
(93.45 KB)
π
nfsdcltrack
(40.11 KB)
π
nfsidmap
(19.32 KB)
π
nfsiostat
(23.64 KB)
π
nfsstat
(29.84 KB)
π
nl-class-add
(11.7 KB)
π
nl-class-delete
(11.55 KB)
π
nl-class-list
(11.48 KB)
π
nl-classid-lookup
(11.29 KB)
π
nl-cls-add
(11.76 KB)
π
nl-cls-delete
(11.68 KB)
π
nl-cls-list
(11.58 KB)
π
nl-link-list
(11.52 KB)
π
nl-pktloc-lookup
(11.36 KB)
π
nl-qdisc-add
(11.6 KB)
π
nl-qdisc-delete
(11.54 KB)
π
nl-qdisc-list
(11.63 KB)
π
nmbd
(249.07 KB)
π
nologin
(7.01 KB)
π
nsec3hash
(11.13 KB)
π
nstat
(23.88 KB)
π
ntpdate
(107.58 KB)
π
ntsysv
(36.24 KB)
π
ocft
(22.04 KB)
π
oddjobd
(72.11 KB)
π
opendkim
(158.3 KB)
π
opendkim-default-keygen
(1.4 KB)
π
opendkim-genkey
(6.29 KB)
π
opendkim-genzone
(66.68 KB)
π
opendkim-reportstats
(14.16 KB)
π
opendkim-testkey
(70.98 KB)
π
opendkim-testmsg
(15.27 KB)
π
osd_login
(2.55 KB)
π
ownership
(15.04 KB)
π
pacemakerd
(59.74 KB)
π
packer
(11.06 KB)
π
pam_console_apply
(39.69 KB)
π
pam_tally2
(15.05 KB)
π
pam_timestamp_check
(10.97 KB)
π
paperconfig
(4.07 KB)
π
parted
(77.22 KB)
π
partprobe
(11.23 KB)
π
partx
(86.55 KB)
π
pcs
(292 B)
π
pdata_tools
(1.23 MB)
π
pethtool
(8.94 KB)
π
php-fpm
(5.03 MB)
π
pidof
(23.17 KB)
π
pifconfig
(3.03 KB)
π
ping6
(64.63 KB)
π
pivot_root
(11.19 KB)
π
plipconfig
(11.06 KB)
π
pluginviewer
(15.23 KB)
π
plymouth-set-default-theme
(6.21 KB)
π
plymouthd
(84.22 KB)
π
pm-hibernate
(2.86 KB)
π
pm-powersave
(2.09 KB)
π
pm-suspend
(2.86 KB)
π
pm-suspend-hybrid
(2.86 KB)
π
pm-utils-bugreport-info.sh
(1.47 KB)
π
portrelease
(15.02 KB)
π
portreserve
(15.02 KB)
π
postalias
(253.87 KB)
π
postcat
(136.08 KB)
π
postconf
(363.19 KB)
π
postdrop
(213.44 KB)
π
postfix
(119.17 KB)
π
postgrey
(37.94 KB)
π
postgreyreport
(23.8 KB)
π
postkick
(131.43 KB)
π
postlock
(127.38 KB)
π
postlog
(119.38 KB)
π
postmap
(257.69 KB)
π
postmulti
(135.89 KB)
π
postqueue
(257.94 KB)
π
postsuper
(139.95 KB)
π
poweroff
(704.8 KB)
π
ppp-watch
(23.2 KB)
π
pppd
(372.98 KB)
π
pppdump
(52.77 KB)
π
pppoe-discovery
(18.04 KB)
π
pppstats
(14.99 KB)
π
praliases
(95.64 KB)
π
proftpd
(988.23 KB)
π
pvchange
(2.15 MB)
π
pvck
(2.15 MB)
π
pvcreate
(2.15 MB)
π
pvdisplay
(2.15 MB)
π
pvmove
(2.15 MB)
π
pvremove
(2.15 MB)
π
pvresize
(2.15 MB)
π
pvs
(2.15 MB)
π
pvscan
(2.15 MB)
π
pwck
(51.71 KB)
π
pwconv
(47.57 KB)
π
pwhistory_helper
(15.44 KB)
π
pwmconfig
(22.92 KB)
π
pwunconv
(47.59 KB)
π
qb-blackbox
(7.02 KB)
π
quot
(70.66 KB)
π
quotacheck
(107.29 KB)
π
quotaoff
(75.03 KB)
π
quotaon
(75.03 KB)
π
quotastats
(14.03 KB)
π
radvd
(101.59 KB)
π
radvdump
(23.64 KB)
π
raid-check
(3.7 KB)
π
ras-mc-ctl
(38.48 KB)
π
rasdaemon
(185.11 KB)
π
rdisc
(23.17 KB)
π
rdma
(73.42 KB)
π
rdma-ndd
(15.36 KB)
π
readprofile
(15.46 KB)
π
realm
(138.77 KB)
π
reboot
(704.8 KB)
π
regdbdump
(7.12 KB)
π
reject
(10.95 KB)
π
repquota
(75.16 KB)
π
request-key
(19.41 KB)
π
resize2fs
(48.41 KB)
π
resizepart
(32.36 KB)
π
restorecon
(27.16 KB)
π
rfkill
(11.29 KB)
π
rmmod
(143.24 KB)
π
rndc
(35.88 KB)
π
rndc-confgen
(19.44 KB)
π
rngd
(42.39 KB)
π
rotatelogs
(19.04 KB)
π
route
(66.6 KB)
π
routef
(173 B)
π
routel
(1.59 KB)
π
rpc.gssd
(88.73 KB)
π
rpc.idmapd
(48.13 KB)
π
rpc.mountd
(128.91 KB)
π
rpc.nfsd
(40.2 KB)
π
rpc.rquotad
(78.95 KB)
π
rpc.statd
(97.59 KB)
π
rpcbind
(60.07 KB)
π
rpcdebug
(18.05 KB)
π
rpcinfo
(27.3 KB)
π
rsyslogd
(648.45 KB)
π
rtacct
(41.93 KB)
π
rtcwake
(31.96 KB)
π
rtkitctl
(10.88 KB)
π
rtmon
(48.67 KB)
π
rtpr
(37 B)
π
rtstat
(20.09 KB)
π
runlevel
(704.8 KB)
π
runuser
(32.21 KB)
π
sa
(36.77 KB)
π
safe_finger
(11.08 KB)
π
saned
(47.41 KB)
π
sasl2-shared-mechlist
(10.98 KB)
π
saslauthd
(92.59 KB)
π
sasldblistusers2
(19.26 KB)
π
saslpasswd2
(15.09 KB)
π
scsieject
(41.07 KB)
π
scsitape
(45.38 KB)
π
sedispatch
(15.56 KB)
π
sefcontext_compile
(60.53 KB)
π
selabel_digest
(11.17 KB)
π
selabel_lookup
(11.14 KB)
π
selabel_lookup_best_match
(11.16 KB)
π
selabel_partial_match
(11.09 KB)
π
selinux_restorecon
(15.21 KB)
π
selinuxconlist
(11.1 KB)
π
selinuxdefcon
(11.12 KB)
π
selinuxenabled
(6.98 KB)
π
selinuxexeccon
(7.09 KB)
π
semanage
(42.76 KB)
π
semodule
(23.77 KB)
π
sendmail
(242.11 KB)
π
sendmail.postfix
(242.11 KB)
π
sendmail.sendmail
(817.3 KB)
π
sensors-detect
(207.11 KB)
π
service
(3.17 KB)
π
sestatus
(15.02 KB)
π
setcap
(11.13 KB)
π
setenforce
(7.05 KB)
π
setfiles
(27.16 KB)
π
setpci
(23.4 KB)
π
setquota
(83.16 KB)
π
setregdomain
(1.7 KB)
π
setroubleshootd
(3.22 KB)
π
setsebool
(14.99 KB)
π
setup
(15.38 KB)
π
sfdisk
(83.25 KB)
π
sgdisk
(168.33 KB)
π
sgpio
(15.63 KB)
π
showmount
(19.56 KB)
π
shutdown
(704.8 KB)
π
skdump
(15.2 KB)
π
sktest
(6.98 KB)
π
slattach
(42.4 KB)
π
sln
(743.78 KB)
π
sm-notify
(68.43 KB)
π
smartctl
(864.48 KB)
π
smartd
(670.63 KB)
π
smbd
(91.84 KB)
π
smrsh
(74.97 KB)
π
smtp-sink
(90.91 KB)
π
smtp-source
(77.79 KB)
π
sosreport
(561 B)
π
spice-vdagentd
(43.73 KB)
π
ss
(128.44 KB)
π
sshd
(832.9 KB)
π
sshd-keygen
(3.53 KB)
π
start-statd
(842 B)
π
stinit
(35.52 KB)
π
stonith_admin
(25.69 KB)
π
suexec
(15.01 KB)
π
sulogin
(40.53 KB)
π
sushell
(67 B)
π
swaplabel
(15.31 KB)
π
swapoff
(15.53 KB)
π
swapon
(53.29 KB)
π
switch_root
(15.35 KB)
π
sys-unconfig
(184 B)
π
sysctl
(23.57 KB)
π
tapeinfo
(45 KB)
π
tc
(384.66 KB)
π
tcpd
(36.62 KB)
π
tcpdmatch
(40.83 KB)
π
tcpdump
(920.16 KB)
π
tcpslice
(23.64 KB)
π
tcsd
(300.27 KB)
π
telinit
(704.8 KB)
π
testsaslauthd
(15.09 KB)
π
thin_check
(1.23 MB)
π
thin_delta
(1.23 MB)
π
thin_dump
(1.23 MB)
π
thin_ls
(1.23 MB)
π
thin_metadata_size
(1.23 MB)
π
thin_repair
(1.23 MB)
π
thin_restore
(1.23 MB)
π
thin_rmap
(1.23 MB)
π
thin_trim
(1.23 MB)
π
tracepath
(15.05 KB)
π
tracepath6
(15.05 KB)
π
try-from
(23.47 KB)
π
tsig-keygen
(19.44 KB)
π
tune2fs
(69.41 KB)
π
tuned
(3.29 KB)
π
tuned-adm
(5.22 KB)
π
udevadm
(414.27 KB)
π
umount.nfs
(114.68 KB)
π
umount.nfs4
(114.68 KB)
π
umount.udisks2
(10.98 KB)
π
unbound-anchor
(55.62 KB)
π
unix_chkpwd
(35.42 KB)
π
unix_update
(35.42 KB)
π
update-alternatives
(27.61 KB)
π
update-pciids
(1.71 KB)
π
update-smart-drivedb
(14.34 KB)
π
usb_modeswitch
(57.61 KB)
π
usb_modeswitch_dispatcher
(236.66 KB)
π
usbmuxd
(69.72 KB)
π
useradd
(134.39 KB)
π
userdel
(93.5 KB)
π
userhelper
(39.38 KB)
π
usermod
(130.33 KB)
π
usernetctl
(11.03 KB)
π
vdptool
(48.96 KB)
π
vgcfgbackup
(2.15 MB)
π
vgcfgrestore
(2.15 MB)
π
vgchange
(2.15 MB)
π
vgck
(2.15 MB)
π
vgconvert
(2.15 MB)
π
vgcreate
(2.15 MB)
π
vgdisplay
(2.15 MB)
π
vgexport
(2.15 MB)
π
vgextend
(2.15 MB)
π
vgimport
(2.15 MB)
π
vgimportclone
(2.15 MB)
π
vgmerge
(2.15 MB)
π
vgmknodes
(2.15 MB)
π
vgreduce
(2.15 MB)
π
vgremove
(2.15 MB)
π
vgrename
(2.15 MB)
π
vgs
(2.15 MB)
π
vgscan
(2.15 MB)
π
vgsplit
(2.15 MB)
π
vigr
(62.54 KB)
π
vipw
(62.54 KB)
π
virt-what
(11.57 KB)
π
virtlockd
(723.38 KB)
π
virtlogd
(719.13 KB)
π
virtualmin
(1.3 KB)
π
visudo
(200.89 KB)
π
vmcore-dmesg
(19.28 KB)
π
vpddecode
(15.33 KB)
π
weak-modules
(31.9 KB)
π
wipefs
(28.05 KB)
π
wpa_cli
(128.06 KB)
π
wpa_passphrase
(56.79 KB)
π
wpa_supplicant
(1.93 MB)
π
xfs_admin
(1.35 KB)
π
xfs_bmap
(638 B)
π
xfs_copy
(339.33 KB)
π
xfs_db
(576.38 KB)
π
xfs_estimate
(11.16 KB)
π
xfs_freeze
(767 B)
π
xfs_fsr
(31.83 KB)
π
xfs_growfs
(327.2 KB)
π
xfs_info
(472 B)
π
xfs_io
(122.68 KB)
π
xfs_logprint
(355.81 KB)
π
xfs_mdrestore
(314.81 KB)
π
xfs_metadump
(747 B)
π
xfs_mkfile
(1007 B)
π
xfs_ncheck
(650 B)
π
xfs_quota
(84.88 KB)
π
xfs_repair
(563.2 KB)
π
xfs_rtcp
(15.25 KB)
π
xfsdump
(291.69 KB)
π
xfsinvutil
(61.87 KB)
π
xfsrestore
(353.2 KB)
π
xqmstats
(14.03 KB)
π
xtables-multi
(91.52 KB)
π
yum-complete-transaction
(9.22 KB)
π
yumdb
(8.67 KB)
π
zdump
(14.02 KB)
π
zic
(50.02 KB)
π
zramctl
(82.23 KB)
Editing: amvault
#! /usr/bin/perl # Copyright (c) 2008-2012 Zmanda, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Contact information: Zmanda Inc., 465 S. Mathilda Ave., Suite 300 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com use lib '/usr/lib64/perl5/vendor_perl'; use strict; use warnings; package main::Interactivity; use POSIX qw( :errno_h ); use Amanda::MainLoop qw( :GIOCondition ); use vars qw( @ISA ); @ISA = qw( Amanda::Interactivity ); sub new { my $class = shift; my $self = { input_src => undef}; return bless ($self, $class); } sub abort() { my $self = shift; if ($self->{'input_src'}) { $self->{'input_src'}->remove(); $self->{'input_src'} = undef; } } sub user_request { my $self = shift; my %params = @_; my %subs; my $buffer = ""; my $message = $params{'message'}; my $label = $params{'label'}; my $err = $params{'err'}; my $chg_name = $params{'chg_name'}; $subs{'data_in'} = sub { my $b; my $n_read = POSIX::read(0, $b, 1); if (!defined $n_read) { return if ($! == EINTR); $self->abort(); return $params{'request_cb'}->( Amanda::Changer::Error->new('fatal', message => "Fail to read from stdin")); } elsif ($n_read == 0) { $self->abort(); return $params{'request_cb'}->( Amanda::Changer::Error->new('fatal', message => "Aborted by user")); } else { $buffer .= $b; if ($b eq "\n") { my $line = $buffer; chomp $line; $buffer = ""; $self->abort(); return $params{'request_cb'}->(undef, $line); } } }; print STDERR "$err\n"; print STDERR "Insert volume labeled '$label' in $chg_name\n"; print STDERR "and press enter, or ^D to abort.\n"; $self->{'input_src'} = Amanda::MainLoop::fd_source(0, $G_IO_IN|$G_IO_HUP|$G_IO_ERR); $self->{'input_src'}->set_callback($subs{'data_in'}); return; }; package Amvault; use Amanda::Config qw( :getconf config_dir_relative ); use Amanda::Debug qw( :logging debug ); use Amanda::Xfer qw( :constants ); use Amanda::Header qw( :constants ); use Amanda::MainLoop; use Amanda::Util qw( quote_string ); use Amanda::DB::Catalog; use Amanda::Recovery::Planner; use Amanda::Recovery::Scan; use Amanda::Recovery::Clerk; use Amanda::Taper::Scan; use Amanda::Taper::Scribe qw( get_splitting_args_from_config ); use Amanda::Changer qw( :constants ); use Amanda::Cmdline; use Amanda::Paths; use Amanda::Logfile qw( :logtype_t log_add log_add_full log_rename $amanda_log_trace_log make_stats ); use Amanda::Util qw ( match_datestamp match_level ); use base qw( Amanda::Recovery::Clerk::Feedback Amanda::Taper::Scribe::Feedback ); sub new { my $class = shift; my %params = @_; bless { quiet => $params{'quiet'}, fulls_only => $params{'fulls_only'}, opt_export => $params{'opt_export'}, opt_dumpspecs => $params{'opt_dumpspecs'}, opt_dry_run => $params{'opt_dry_run'}, config_name => $params{'config_name'}, src_write_timestamp => $params{'src_write_timestamp'}, dst_changer => $params{'dst_changer'}, dst_autolabel => $params{'dst_autolabel'}, dst_write_timestamp => $params{'dst_write_timestamp'}, src => undef, dst => undef, cleanup => {}, exporting => 0, # is an export in progress? call_after_export => undef, # call this when export complete config_overrides_opts => $params{'config_overrides_opts'}, trace_log_filename => getconf($CNF_LOGDIR) . "/log", # called when the operation is complete, with the exit # status exit_cb => undef, }, $class; } sub run_subprocess { my ($proc, @args) = @_; my $pid = POSIX::fork(); if ($pid == 0) { my $null = POSIX::open("/dev/null", POSIX::O_RDWR); POSIX::dup2($null, 0); POSIX::dup2($null, 1); POSIX::dup2($null, 2); exec $proc, @args; die "Could not exec $proc: $!"; } waitpid($pid, 0); my $s = $? >> 8; debug("$proc exited with code $s: $!"); } sub do_amcleanup { my $self = shift; return 1 unless -f $self->{'trace_log_filename'}; # logfiles are still around. First, try an amcleanup -p to see if # the actual processes are already dead debug("runing amcleanup -p"); run_subprocess("$sbindir/amcleanup", '-p', $self->{'config_name'}, $self->{'config_overrides_opts'}); return 1 unless -f $self->{'trace_log_filename'}; return 0; } sub bail_already_running() { my $self = shift; my $msg = "An Amanda process is already running - please run amcleanup manually"; print "$msg\n"; debug($msg); $self->{'exit_cb'}->(1); } sub run { my $self = shift; my ($exit_cb) = @_; die "already called" if $self->{'exit_cb'}; $self->{'exit_cb'} = $exit_cb; # check that the label template is valid my $dst_label_template = $self->{'dst_autolabel'}->{'template'}; return $self->failure("Invalid label template '$dst_label_template'") if ($dst_label_template =~ /%[^%]+%/ or $dst_label_template =~ /^[^%]+$/); # open up a trace log file and put our imprimatur on it, unless dry_runing if (!$self->{'opt_dry_run'}) { if (!$self->do_amcleanup()) { return $self->bail_already_running(); } log_add($L_INFO, "amvault pid $$"); # Check we own the log file open(my $tl, "<", $self->{'trace_log_filename'}) or die("could not open trace log file '$self->{'trace_log_filename'}': $!"); if (<$tl> !~ /^INFO amvault amvault pid $$/) { debug("another amdump raced with this one, and won"); close($tl); return $self->bail_already_running(); } close($tl); log_add($L_START, "date " . $self->{'dst_write_timestamp'}); Amanda::Debug::add_amanda_log_handler($amanda_log_trace_log); $self->{'cleanup'}{'roll_trace_log'} = 1; } $self->setup_src(); } sub setup_src { my $self = shift; my $src = $self->{'src'} = {}; # put together a clerk, which of course requires a changer, scan, # interactivity, and feedback my $chg = Amanda::Changer->new(); return $self->failure("Error opening source changer: $chg") if $chg->isa('Amanda::Changer::Error'); $src->{'chg'} = $chg; $src->{'seen_labels'} = {}; $src->{'interactivity'} = main::Interactivity->new(); $src->{'scan'} = Amanda::Recovery::Scan->new( chg => $src->{'chg'}, interactivity => $src->{'interactivity'}); $src->{'clerk'} = Amanda::Recovery::Clerk->new( changer => $src->{'chg'}, feedback => $self, scan => $src->{'scan'}); $self->{'cleanup'}{'quit_clerk'} = 1; # translate "latest" into the most recent timestamp that wasn't created by amvault if (defined $self->{'src_write_timestamp'} && $self->{'src_write_timestamp'} eq "latest") { my $ts = $self->{'src_write_timestamp'} = Amanda::DB::Catalog::get_latest_write_timestamp(types => ['amdump', 'amflush']); return $self->failure("No dumps found") unless defined $ts; $self->vlog("Using latest timestamp: $ts"); } # we need to combine fulls_only, src_write_timestamp, and the set # of dumpspecs. If they contradict one another, then drop the # non-matching dumpspec with a warning. my @dumpspecs; if ($self->{'opt_dumpspecs'}) { my $level = $self->{'fulls_only'}? "0" : undef; my $swt = $self->{'src_write_timestamp'}; # filter and adjust the dumpspecs for my $ds (@{$self->{'opt_dumpspecs'}}) { my $ds_host = $ds->{'host'}; my $ds_disk = $ds->{'disk'}; my $ds_datestamp = $ds->{'datestamp'}; my $ds_level = $ds->{'level'}; my $ds_write_timestamp = $ds->{'write_timestamp'}; if ($swt) { # it's impossible for parse_dumpspecs to set write_timestamp, # so there's no risk of overlap here $ds_write_timestamp = $swt; } if (defined $level) { if (defined $ds_level && !match_level($ds_level, $level)) { $self->vlog("WARNING: dumpspec " . $ds->format() . " specifies non-full dumps, contradicting --fulls-only;" . " ignoring dumpspec"); next; } $ds_level = $level; } # create a new dumpspec, since dumpspecs are immutable push @dumpspecs, Amanda::Cmdline::dumpspec_t->new( $ds_host, $ds_disk, $ds_datestamp, $ds_level, $ds_write_timestamp); } } else { # convert the timestamp and level to a dumpspec my $level = $self->{'fulls_only'}? "0" : undef; push @dumpspecs, Amanda::Cmdline::dumpspec_t->new( undef, undef, undef, $level, $self->{'src_write_timestamp'}); } # if we ignored all of the dumpspecs and didn't create any, then dump # nothing. We do *not* want the wildcard "vault it all!" behavior. if (!@dumpspecs) { return $self->failure("No dumps to vault"); } if (!$self->{'opt_dry_run'}) { # summarize the requested dumps my $request; if ($self->{'src_write_timestamp'}) { $request = "vaulting from volumes written " . $self->{'src_write_timestamp'}; } else { $request = "vaulting"; } if ($self->{'opt_dumpspecs'}) { $request .= " dumps matching dumpspecs:"; } if ($self->{'fulls_only'}) { $request .= " (fulls only)"; } log_add($L_INFO, $request); # and log the dumpspecs if they were given if ($self->{'opt_dumpspecs'}) { for my $ds (@{$self->{'opt_dumpspecs'}}) { log_add($L_INFO, " " . $ds->format()); } } } Amanda::Recovery::Planner::make_plan( dumpspecs => \@dumpspecs, changer => $src->{'chg'}, plan_cb => sub { $self->plan_cb(@_) }); } sub plan_cb { my $self = shift; my ($err, $plan) = @_; my $src = $self->{'src'}; return $self->failure($err) if $err; $src->{'plan'} = $plan; if ($self->{'opt_dry_run'}) { my $total_kb = Math::BigInt->new(0); # iterate over each part of each dump, printing out the basic information for my $dump (@{$plan->{'dumps'}}) { my @parts = @{$dump->{'parts'}}; shift @parts; # skip partnum 0 for my $part (@parts) { print STDOUT ($part->{'label'} || $part->{'holding_file'}) . " " . ($part->{'filenum'} || '') . " " . $dump->{'hostname'} . " " . $dump->{'diskname'} . " " . $dump->{'dump_timestamp'} . " " . $dump->{'level'} . "\n"; } $total_kb += int $dump->{'kb'}; } print STDOUT "Total Size: $total_kb KB\n"; return $self->quit(0); } # output some 'DISK amvault' lines to indicate the disks we will be vaulting my %seen; for my $dump (@{$plan->{'dumps'}}) { my $key = $dump->{'hostname'}."\0".$dump->{'diskname'}; next if $seen{$key}; $seen{$key} = 1; log_add($L_DISK, quote_string($dump->{'hostname'}) . " " . quote_string($dump->{'diskname'})); } if (@{$plan->{'dumps'}} == 0) { return $self->failure("No dumps to vault"); } $self->setup_dst(); } sub setup_dst { my $self = shift; my $dst = $self->{'dst'} = {}; my $tlf = Amanda::Config::config_dir_relative(getconf($CNF_TAPELIST)); my $tl = Amanda::Tapelist->new($tlf); $dst->{'label'} = undef; $dst->{'tape_num'} = 0; my $chg = Amanda::Changer->new($self->{'dst_changer'}, tapelist => $tl, labelstr => getconf($CNF_LABELSTR), autolabel => $self->{'dst_autolabel'}); return $self->failure("Error opening destination changer: $chg") if $chg->isa('Amanda::Changer::Error'); $dst->{'chg'} = $chg; my $interactivity = Amanda::Interactivity->new( name => getconf($CNF_INTERACTIVITY)); my $scan_name = getconf($CNF_TAPERSCAN); $dst->{'scan'} = Amanda::Taper::Scan->new( algorithm => $scan_name, changer => $dst->{'chg'}, interactivity => $interactivity, tapelist => $tl, labelstr => getconf($CNF_LABELSTR), autolabel => $self->{'dst_autolabel'}); $dst->{'scribe'} = Amanda::Taper::Scribe->new( taperscan => $dst->{'scan'}, feedback => $self); $dst->{'scribe'}->start( write_timestamp => $self->{'dst_write_timestamp'}, finished_cb => sub { $self->scribe_started(@_); }) } sub scribe_started { my $self = shift; my ($err) = @_; return $self->failure($err) if $err; $self->{'cleanup'}{'quit_scribe'} = 1; my $xfers_finished = sub { my ($err) = @_; return $self->failure($err) if $err; $self->quit(0); }; $self->xfer_dumps($xfers_finished); } sub xfer_dumps { my $self = shift; my ($finished_cb) = @_; my $src = $self->{'src'}; my $dst = $self->{'dst'}; my ($xfer_src, $xfer_dst, $xfer, $n_threads, $last_partnum); my $current; my $steps = define_steps cb_ref => \$finished_cb; step get_dump => sub { # reset tracking for teh current dump $self->{'current'} = $current = { src_result => undef, src_errors => undef, dst_result => undef, dst_errors => undef, size => 0, duration => 0.0, total_duration => 0.0, nparts => 0, header => undef, dump => undef, }; my $dump = $src->{'plan'}->shift_dump(); if (!$dump) { return $finished_cb->(); } $current->{'dump'} = $dump; $steps->{'get_xfer_src'}->(); }; step get_xfer_src => sub { $src->{'clerk'}->get_xfer_src( dump => $current->{'dump'}, xfer_src_cb => $steps->{'got_xfer_src'}) }; step got_xfer_src => sub { my ($errors, $header, $xfer_src_, $directtcp_supported) = @_; $xfer_src = $xfer_src_; return $finished_cb->(join("\n", @$errors)) if $errors; $current->{'header'} = $header; # set up splitting args from the tapetype only, since we have no DLEs my $tt = lookup_tapetype(getconf($CNF_TAPETYPE)); sub empty2undef { $_[0]? $_[0] : undef } my %xfer_dest_args; if ($tt) { %xfer_dest_args = get_splitting_args_from_config( part_size_kb => empty2undef(tapetype_getconf($tt, $TAPETYPE_PART_SIZE)), part_cache_type_enum => empty2undef(tapetype_getconf($tt, $TAPETYPE_PART_CACHE_TYPE)), part_cache_dir => empty2undef(tapetype_getconf($tt, $TAPETYPE_PART_CACHE_DIR)), part_cache_max_size => empty2undef(tapetype_getconf($tt, $TAPETYPE_PART_CACHE_MAX_SIZE)), ); } # (else leave %xfer_dest_args empty, for no splitting) $xfer_dst = $dst->{'scribe'}->get_xfer_dest( max_memory => getconf($CNF_DEVICE_OUTPUT_BUFFER_SIZE), can_cache_inform => 0, %xfer_dest_args, ); # create and start the transfer $xfer = Amanda::Xfer->new([ $xfer_src, $xfer_dst ]); my $size = 0; $size = $current->{'dump'}->{'bytes'} if exists $current->{'dump'}->{'bytes'}; $xfer->start($steps->{'handle_xmsg'}, 0, $size); # count the "threads" running here (clerk and scribe) $n_threads = 2; # and let both the scribe and the clerk know that data is in motion $src->{'clerk'}->start_recovery( xfer => $xfer, recovery_cb => $steps->{'recovery_cb'}); $dst->{'scribe'}->start_dump( xfer => $xfer, dump_header => $header, dump_cb => $steps->{'dump_cb'}); }; step handle_xmsg => sub { $src->{'clerk'}->handle_xmsg(@_); $dst->{'scribe'}->handle_xmsg(@_); }; step recovery_cb => sub { my %params = @_; $current->{'src_result'} = $params{'result'}; $current->{'src_errors'} = $params{'errors'}; $steps->{'maybe_done'}->(); }; step dump_cb => sub { my %params = @_; $current->{'dst_result'} = $params{'result'}; $current->{'dst_errors'} = $params{'device_errors'}; $current->{'size'} = $params{'size'}; $current->{'duration'} = $params{'duration'}; $current->{'nparts'} = $params{'nparts'}; $current->{'total_duration'} = $params{'total_duration'}; $steps->{'maybe_done'}->(); }; step maybe_done => sub { return unless --$n_threads == 0; my @errors = (@{$current->{'src_errors'}}, @{$current->{'dst_errors'}}); # figure out how to log this, based on the results from the clerk (src) # and scribe (dst) my $logtype; if ($current->{'src_result'} eq 'DONE') { if ($current->{'dst_result'} eq 'DONE') { $logtype = $L_DONE; } elsif ($current->{'dst_result'} eq 'PARTIAL') { $logtype = $L_PARTIAL; } else { # ($current->{'dst_result'} eq 'FAILED') $logtype = $L_FAIL; } } else { if ($current->{'size'} > 0) { $logtype = $L_PARTIAL; } else { $logtype = $L_FAIL; } } my $dump = $current->{'dump'}; my $stats = make_stats($current->{'size'}, $current->{'total_duration'}, $dump->{'orig_kb'}); my $msg = quote_string(join("; ", @errors)); # write a DONE/PARTIAL/FAIL log line if ($logtype == $L_FAIL) { log_add_full($L_FAIL, "taper", sprintf("%s %s %s %s %s %s", quote_string($dump->{'hostname'}.""), # " is required for SWIG.. quote_string($dump->{'diskname'}.""), $dump->{'dump_timestamp'}, $dump->{'level'}, 'error', $msg)); } else { log_add_full($logtype, "taper", sprintf("%s %s %s %s %s %s%s", quote_string($dump->{'hostname'}.""), # " is required for SWIG.. quote_string($dump->{'diskname'}.""), $dump->{'dump_timestamp'}, $current->{'nparts'}, $dump->{'level'}, $stats, ($logtype == $L_PARTIAL and @errors)? " $msg" : "")); } if (@errors) { return $finished_cb->("transfer failed: " . join("; ", @errors)); } else { # rinse, wash, and repeat return $steps->{'get_dump'}->(); } }; } sub quit { my $self = shift; my ($exit_status) = @_; my $exit_cb = $self->{'exit_cb'}; my $steps = define_steps cb_ref => \$exit_cb; # the export may not start until we quit the scribe, so wait for it now.. step check_exporting => sub { # if we're exporting the final volume, wait for that to complete if ($self->{'exporting'}) { $self->{'call_after_export'} = $steps->{'quit_scribe'}; } else { $steps->{'quit_scribe'}->(); } }; # we may have several resources to clean up.. step quit_scribe => sub { if ($self->{'cleanup'}{'quit_scribe'}) { debug("quitting scribe.."); $self->{'dst'}{'scribe'}->quit( finished_cb => $steps->{'quit_scribe_finished'}); } else { $steps->{'quit_clerk'}->(); } }; step quit_scribe_finished => sub { $self->{'dst'}{'scan'}->quit(); my ($err) = @_; if ($err) { print STDERR "$err\n"; $exit_status = 1; } $steps->{'quit_clerk'}->(); }; step quit_clerk => sub { if ($self->{'cleanup'}{'quit_clerk'}) { debug("quitting clerk.."); $self->{'src'}{'clerk'}->quit( finished_cb => $steps->{'quit_clerk_finished'}); } else { $steps->{'roll_log'}->(); } }; step quit_clerk_finished => sub { my ($err) = @_; if ($err) { print STDERR "$err\n"; $exit_status = 1; } $steps->{'roll_log'}->(); }; step roll_log => sub { if (defined $self->{'src'}->{'chg'}) { $self->{'src'}->{'chg'}->quit(); $self->{'src'}->{'chg'} = undef; } if (defined $self->{'dst'}->{'chg'}) { $self->{'dst'}->{'chg'}->quit(); $self->{'dst'}->{'chg'} = undef; } if ($self->{'cleanup'}{'roll_trace_log'}) { log_add_full($L_FINISH, "driver", "fake driver finish"); log_add($L_INFO, "pid-done $$"); my @amreport_cmd = ("$sbindir/amreport", $self->{'config_name'}, "--from-amdump", @{$self->{'config_overrides_opts'}}); debug("invoking amreport (" . join(" ", @amreport_cmd) . ")"); system(@amreport_cmd); debug("rolling logfile.."); log_rename($self->{'dst_write_timestamp'}); } $exit_cb->($exit_status); }; } ## utilities sub failure { my $self = shift; my ($msg) = @_; print STDERR "$msg\n"; debug("failure: $msg"); # if we've got a logfile open that will be rolled, we might as well log # an error. if ($self->{'cleanup'}{'roll_trace_log'}) { log_add($L_FATAL, "$msg"); } $self->quit(1); } sub vlog { my $self = shift; if (!$self->{'quiet'}) { print @_, "\n"; } } ## scribe feedback methods # note that the trace log calls here all add "taper", as we're dry_runing # to be the taper in the logfiles. sub request_volume_permission { my $self = shift; my %params = @_; # sure, use all the volumes you want, no problem! # TODO: limit to a vaulting-specific value of runtapes $self->{'dst'}->{'scribe'}->start_scan(); $params{'perm_cb'}->(allow => 1); } sub scribe_notif_new_tape { my $self = shift; my %params = @_; if ($params{'volume_label'}) { $self->{'dst'}->{'label'} = $params{'volume_label'}; # add to the trace log log_add_full($L_START, "taper", sprintf("datestamp %s label %s tape %s", $self->{'dst_write_timestamp'}, quote_string($self->{'dst'}->{'label'}), ++$self->{'dst'}->{'tape_num'})); } else { $self->{'dst'}->{'label'} = undef; print STDERR "Could not start new destination volume: $params{error}"; } } sub scribe_notif_part_done { my $self = shift; my %params = @_; $self->{'last_partnum'} = $params{'partnum'}; my $stats = make_stats($params{'size'}, $params{'duration'}, $self->{'orig_kb'}); # log the part, using PART or PARTPARTIAL my $hdr = $self->{'current'}->{'header'}; my $logbase = sprintf("%s %s %s %s %s %s/%s %s %s", quote_string($self->{'dst'}->{'label'}), $params{'fileno'}, quote_string($hdr->{'name'}.""), # " is required for SWIG.. quote_string($hdr->{'disk'}.""), $hdr->{'datestamp'}."", $params{'partnum'}, -1, # totalparts is always -1 $hdr->{'dumplevel'}, $stats); if ($params{'successful'}) { log_add_full($L_PART, "taper", $logbase); } else { log_add_full($L_PARTPARTIAL, "taper", "$logbase \"No space left on device\""); } if ($params{'successful'}) { $self->vlog("Wrote $self->{dst}->{label}:$params{'fileno'}: " . $hdr->summary()); } } sub scribe_notif_log_info { my $self = shift; my %params = @_; debug("$params{'message'}"); log_add_full($L_INFO, "taper", $params{'message'}); } sub scribe_notif_tape_done { my $self = shift; my %params = @_; # immediately flag that we are busy exporting, to prevent amvault from # quitting too soon. The 'done' step will clear this flag. We increment # and decrement this to allow for the (unlikely) situation that multiple # exports are going on simultaneously. $self->{'exporting'}++; my $finished_cb = $params{'finished_cb'}; my $steps = define_steps cb_ref => \$finished_cb; step check_option => sub { if (!$self->{'opt_export'}) { return $steps->{'done'}->(); } $steps->{'get_inventory'}->(); }; step get_inventory => sub { $self->{'dst'}->{'chg'}->inventory( inventory_cb => $steps->{'inventory_cb'}); }; step inventory_cb => sub { my ($err, $inventory) = @_; if ($err) { print STDERR "Could not get destination inventory: $err\n"; return $steps->{'done'}->(); } # find the slots we want in the inventory my ($ie_slot, $from_slot); for my $info (@$inventory) { if (defined $info->{'state'} && $info->{'state'} != Amanda::Changer::SLOT_FULL && $info->{'import_export'}) { $ie_slot = $info->{'slot'}; } if ($info->{'label'} and $info->{'label'} eq $params{'volume_label'}) { $from_slot = $info->{'slot'}; } } if (!$ie_slot) { print STDERR "No import/export slots available; skipping export\n"; return $steps->{'done'}->(); } elsif (!$from_slot) { print STDERR "Could not find the just-written tape; skipping export\n"; return $steps->{'done'}->(); } else { return $steps->{'do_move'}->($ie_slot, $from_slot); } }; step do_move => sub { my ($ie_slot, $from_slot) = @_; # TODO: there is a risk here that the volume is no longer in the slot # where we expect it to be, because the taperscan has moved it. A # failure from move() is not fatal, though, so this will only cause the # volume to be left un-exported. $self->{'dst'}->{'chg'}->move( from_slot => $from_slot, to_slot => $ie_slot, finished_cb => $steps->{'moved'}); }; step moved => sub { my ($err) = @_; if ($err) { print STDERR "While exporting just-written tape: $err (ignored)\n"; } $steps->{'done'}->(); }; step done => sub { if (--$self->{'exporting'} == 0) { if ($self->{'call_after_export'}) { my $cae = $self->{'call_after_export'}; $self->{'call_after_export'} = undef; $cae->(); } } $finished_cb->(); }; } ## clerk feedback methods sub clerk_notif_part { my $self = shift; my ($label, $fileno, $header) = @_; # see if this is a new label if (!exists $self->{'src'}->{'seen_labels'}->{$label}) { $self->{'src'}->{'seen_labels'}->{$label} = 1; log_add($L_INFO, "reading from source volume '$label'"); } $self->vlog("Reading $label:$fileno: ", $header->summary()); } sub clerk_notif_holding { my $self = shift; my ($filename, $header) = @_; # this used to give the fd from which the holding file was being read.. why?? $self->vlog("Reading '$filename'", $header->summary()); } ## Application initialization package main; use Amanda::Config qw( :init :getconf ); use Amanda::Debug qw( :logging ); use Amanda::Util qw( :constants ); use Getopt::Long; use Amanda::Cmdline qw( :constants parse_dumpspecs ); sub usage { my ($msg) = @_; print STDERR <<EOF; **NOTE** this interface is under development and will change in future releases! Usage: amvault [-o configoption...] [-q] [--quiet] [-n] [--dry-run] [--fulls-only] [--export] [--src-timestamp src-timestamp] [--exact-match] --label-template label-template --dst-changer dst-changer [--autolabel autolabel-arg...] config [hostname [ disk [ date [ level [ hostname [...] ] ] ] ]] -o: configuration override (see amanda(8)) -q: quiet progress messages --fulls-only: only copy full (level-0) dumps --export: move completed destination volumes to import/export slots --src-timestamp: the timestamp of the Amanda run that should be vaulted --label-template: the template to use for new volume labels --dst-changer: the changer to which dumps should be written --autolabel: similar to the amanda.conf parameter; may be repeated (default: empty) Copies data from the run with timestamp <src-timestamp> onto volumes using the changer <dst-changer>, labeling new volumes with <label-template>. If <src-timestamp> is "latest", then the most recent run of amdump or amflush will be used. If any dumpspecs are included (<host-expr> and so on), then only dumps matching those dumpspecs will be dumped. At least one of --fulls-only, --src-timestamp, or a dumpspec must be specified. EOF if ($msg) { print STDERR "ERROR: $msg\n"; } exit(1); } Amanda::Util::setup_application("amvault", "server", $CONTEXT_CMDLINE); my $config_overrides = new_config_overrides($#ARGV+1); my @config_overrides_opts; my $opt_quiet = 0; my $opt_dry_run = 0; my $opt_fulls_only = 0; my $opt_exact_match = 0; my $opt_export = 0; my $opt_autolabel = {}; my $opt_autolabel_seen = 0; my $opt_src_write_timestamp; my $opt_dst_changer; sub set_label_template { usage("only one --label-template allowed") if $opt_autolabel->{'template'}; $opt_autolabel->{'template'} = $_[1]; } sub add_autolabel { my ($opt, $val) = @_; $val = lc($val); $val =~ s/-/_/g; $opt_autolabel_seen = 1; my @ok = qw(other_config non_amanda volume_error empty); for (@ok) { if ($val eq $_) { $opt_autolabel->{$_} = 1; return; } } if ($val eq 'any') { for (@ok) { $opt_autolabel->{$_} = 1; } return; } usage("unknown --autolabel value '$val'"); } debug("Arguments: " . join(' ', @ARGV)); Getopt::Long::Configure(qw{ bundling }); GetOptions( 'o=s' => sub { push @config_overrides_opts, "-o" . $_[1]; add_config_override_opt($config_overrides, $_[1]); }, 'q|quiet' => \$opt_quiet, 'n|dry-run' => \$opt_dry_run, 'fulls-only' => \$opt_fulls_only, 'exact-match' => \$opt_exact_match, 'export' => \$opt_export, 'label-template=s' => \&set_label_template, 'autolabel=s' => \&add_autolabel, 'src-timestamp=s' => \$opt_src_write_timestamp, 'dst-changer=s' => \$opt_dst_changer, 'version' => \&Amanda::Util::version_opt, 'help' => \&usage, ) or usage("usage error"); $opt_autolabel->{'empty'} = 1 unless $opt_autolabel_seen; usage("not enough arguments") unless (@ARGV >= 1); my $config_name = shift @ARGV; my $cmd_flags = $CMDLINE_PARSE_DATESTAMP|$CMDLINE_PARSE_LEVEL; $cmd_flags |= $CMDLINE_EXACT_MATCH if $opt_exact_match; my @opt_dumpspecs = parse_dumpspecs(\@ARGV, $cmd_flags) if (@ARGV); usage("no --label-template given") unless $opt_autolabel->{'template'}; usage("no --dst-changer given") unless $opt_dst_changer; usage("specify something to select the source dumps") unless $opt_src_write_timestamp or $opt_fulls_only or @opt_dumpspecs; set_config_overrides($config_overrides); config_init($CONFIG_INIT_EXPLICIT_NAME, $config_name); my ($cfgerr_level, @cfgerr_errors) = config_errors(); if ($cfgerr_level >= $CFGERR_WARNINGS) { config_print_errors(); if ($cfgerr_level >= $CFGERR_ERRORS) { print STDERR "errors processing config file\n"; exit(1); } } Amanda::Util::finish_setup($RUNNING_AS_DUMPUSER); my $exit_status; my $exit_cb = sub { ($exit_status) = @_; Amanda::MainLoop::quit(); }; my $vault = Amvault->new( config_name => $config_name, src_write_timestamp => $opt_src_write_timestamp, dst_changer => $opt_dst_changer, dst_autolabel => $opt_autolabel, dst_write_timestamp => Amanda::Util::generate_timestamp(), opt_dumpspecs => @opt_dumpspecs? \@opt_dumpspecs : undef, opt_dry_run => $opt_dry_run, quiet => $opt_quiet, fulls_only => $opt_fulls_only, opt_export => $opt_export, config_overrides_opts => \@config_overrides_opts); Amanda::MainLoop::call_later(sub { $vault->run($exit_cb) }); Amanda::MainLoop::run(); Amanda::Util::finish_application(); exit($exit_status);
Upload File
Create Folder