Current Path: > > bin
Operation : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0555 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
7za | File | 46 bytes | October 04 2024 01:50:29. | |
GET | File | 16217 bytes | April 22 2022 20:13:06. | |
File | 418704 bytes | October 13 2019 00:19:50. | ||
[ | File | 54960 bytes | April 01 2023 08:44:39. | |
aclocal | File | 36478 bytes | October 14 2023 20:00:43. | |
aclocal-1.16 | File | 36478 bytes | October 14 2023 20:00:43. | |
addr2line | File | 34216 bytes | November 15 2024 09:59:32. | |
animate | File | 12128 bytes | April 01 2025 13:15:58. | |
ar | File | 63448 bytes | November 15 2024 09:59:32. | |
arch | File | 38304 bytes | April 01 2023 08:44:39. | |
arpaname | File | 12104 bytes | February 20 2025 09:05:41. | |
as | File | 911264 bytes | November 15 2024 09:59:32. | |
aspell | File | 163328 bytes | April 18 2022 15:10:53. | |
at | File | 1036 bytes | October 10 2022 10:23:17. | |
atq | File | 1038 bytes | October 10 2022 10:23:17. | |
atrm | File | 1040 bytes | October 10 2022 10:23:17. | |
autoconf | File | 14768 bytes | August 13 2024 19:30:48. | |
autoheader | File | 8534 bytes | August 13 2024 19:30:48. | |
autom4te | File | 32181 bytes | August 13 2024 19:30:48. | |
automake | File | 257949 bytes | October 14 2023 20:00:43. | |
automake-1.16 | File | 257949 bytes | October 14 2023 20:00:43. | |
autoreconf | File | 21066 bytes | August 13 2024 19:30:48. | |
autoscan | File | 17124 bytes | August 13 2024 19:30:48. | |
autoupdate | File | 33872 bytes | August 13 2024 19:30:48. | |
awk | File | 685848 bytes | April 18 2022 15:56:05. | |
b2sum | File | 59144 bytes | April 01 2023 08:44:39. | |
base32 | File | 42544 bytes | April 01 2023 08:44:39. | |
base64 | File | 42560 bytes | April 01 2023 08:44:39. | |
basename | File | 38392 bytes | April 01 2023 08:44:39. | |
bash | File | 1150584 bytes | May 23 2024 08:55:42. | |
bashbug-64 | File | 7348 bytes | May 23 2024 08:55:35. | |
batch | File | 137 bytes | October 10 2022 10:23:17. | |
bison | File | 448224 bytes | October 12 2019 12:28:39. | |
bunzip2 | File | 37744 bytes | January 28 2025 01:38:59. | |
bzcat | File | 37744 bytes | January 28 2025 01:38:59. | |
bzcmp | File | 2128 bytes | January 28 2025 01:38:58. | |
bzdiff | File | 2128 bytes | January 28 2025 01:38:58. | |
bzgrep | File | 1677 bytes | January 28 2025 01:38:58. | |
bzip2 | File | 37744 bytes | January 28 2025 01:38:59. | |
bzip2recover | File | 16832 bytes | January 28 2025 01:38:59. | |
bzless | File | 1259 bytes | January 28 2025 01:38:58. | |
bzmore | File | 1259 bytes | January 28 2025 01:38:58. | |
c++ | File | 1270688 bytes | March 31 2025 10:38:33. | |
c++filt | File | 29584 bytes | November 15 2024 09:59:32. | |
c89 | File | 224 bytes | March 31 2025 10:36:31. | |
c99 | File | 215 bytes | March 31 2025 10:36:31. | |
cagefs_enter.proxied | File | 1056 bytes | May 26 2025 11:13:23. | |
cal | File | 67560 bytes | April 06 2024 13:02:53. | |
captoinfo | File | 87360 bytes | October 14 2023 18:54:49. | |
cat | File | 38440 bytes | April 01 2023 08:44:39. | |
catchsegv | File | 3283 bytes | June 09 2025 20:25:38. | |
cc | File | 1266552 bytes | March 31 2025 10:38:36. | |
chcon | File | 72120 bytes | April 01 2023 08:44:39. | |
chgrp | File | 67944 bytes | April 01 2023 08:44:39. | |
chmod | File | 63784 bytes | April 01 2023 08:44:39. | |
chown | File | 72080 bytes | April 01 2023 08:44:39. | |
chrt | File | 38072 bytes | April 06 2024 13:02:53. | |
cksum | File | 38360 bytes | April 01 2023 08:44:39. | |
cldetect | File | 10600 bytes | June 05 2025 09:53:15. | |
clear | File | 12840 bytes | October 14 2023 18:54:49. | |
clusterdb | File | 71920 bytes | February 27 2024 08:25:00. | |
cmp | File | 106248 bytes | May 04 2020 15:15:14. | |
col | File | 29696 bytes | April 06 2024 13:02:53. | |
colcrt | File | 16872 bytes | April 06 2024 13:02:53. | |
colrm | File | 25480 bytes | April 06 2024 13:02:53. | |
column | File | 50656 bytes | April 06 2024 13:02:53. | |
comm | File | 42632 bytes | April 01 2023 08:44:39. | |
compare | File | 12136 bytes | April 01 2025 13:15:58. | |
composite | File | 12120 bytes | April 01 2025 13:15:58. | |
conjure | File | 12120 bytes | April 01 2025 13:15:58. | |
convert | File | 12120 bytes | April 01 2025 13:15:58. | |
cp | File | 151600 bytes | April 01 2023 08:44:39. | |
cpan | File | 8370 bytes | June 03 2025 14:32:21. | |
cpp | File | 1266600 bytes | March 31 2025 10:38:33. | |
createdb | File | 71904 bytes | February 27 2024 08:25:00. | |
createuser | File | 76416 bytes | February 27 2024 08:25:00. | |
crontab | File | 1524 bytes | April 06 2024 11:40:05. | |
crontab.cagefs | File | 55464 bytes | June 23 2025 12:23:46. | |
csplit | File | 55048 bytes | April 01 2023 08:44:39. | |
curl | File | 235608 bytes | January 28 2025 01:43:10. | |
cut | File | 50784 bytes | April 01 2023 08:44:39. | |
date | File | 108576 bytes | April 01 2023 08:44:39. | |
dbiprof | File | 6206 bytes | April 25 2022 16:10:04. | |
dd | File | 79920 bytes | April 01 2023 08:44:39. | |
delv | File | 43480 bytes | February 20 2025 09:05:41. | |
df | File | 93352 bytes | April 01 2023 08:44:39. | |
diff | File | 274440 bytes | May 04 2020 15:15:14. | |
diff3 | File | 131688 bytes | May 04 2020 15:15:14. | |
dig | File | 166080 bytes | February 20 2025 09:05:41. | |
dir | File | 143328 bytes | April 01 2023 08:44:39. | |
dircolors | File | 50816 bytes | April 01 2023 08:44:39. | |
dirname | File | 34240 bytes | April 01 2023 08:44:39. | |
display | File | 12128 bytes | April 01 2025 13:15:58. | |
dnstap-read | File | 20920 bytes | February 20 2025 09:05:41. | |
dropdb | File | 67608 bytes | February 27 2024 08:25:00. | |
dropuser | File | 67576 bytes | February 27 2024 08:25:00. | |
du | File | 109672 bytes | April 01 2023 08:44:39. | |
easy_install-3 | File | bytes | January 01 1970 00:00:00. | |
echo | File | 38328 bytes | April 01 2023 08:44:39. | |
egrep | File | 28 bytes | October 11 2019 15:15:56. | |
enc2xs | File | 41958 bytes | October 13 2019 08:46:10. | |
enchant | File | 21584 bytes | October 23 2019 20:03:55. | |
enchant-lsmod | File | 13408 bytes | October 23 2019 20:03:55. | |
env | File | 42424 bytes | April 01 2023 08:44:39. | |
eps2eps | File | 639 bytes | June 03 2025 02:48:11. | |
eqn | File | 237728 bytes | October 13 2019 14:29:41. | |
ex | File | 1180368 bytes | August 02 2022 16:57:02. | |
expand | File | 42664 bytes | April 01 2023 08:44:39. | |
expr | File | 50840 bytes | April 01 2023 08:44:39. | |
factor | File | 88120 bytes | April 01 2023 08:44:39. | |
false | File | 34192 bytes | April 01 2023 08:44:39. | |
fc-cache | File | 132 bytes | August 16 2021 11:04:22. | |
fc-cache-64 | File | 20840 bytes | October 09 2021 09:02:09. | |
fc-cat | File | 16744 bytes | October 09 2021 09:02:09. | |
fc-conflist | File | 12544 bytes | October 09 2021 09:02:09. | |
fc-list | File | 12544 bytes | October 09 2021 09:02:09. | |
fc-match | File | 16648 bytes | October 09 2021 09:02:09. | |
fc-pattern | File | 12552 bytes | October 09 2021 09:02:09. | |
fc-query | File | 12536 bytes | October 09 2021 09:02:09. | |
fc-scan | File | 12552 bytes | October 09 2021 09:02:09. | |
fc-validate | File | 16648 bytes | October 09 2021 09:02:09. | |
fgrep | File | 28 bytes | October 11 2019 15:15:56. | |
file | File | 25272 bytes | April 06 2024 14:44:54. | |
find | File | 228664 bytes | September 24 2024 02:19:34. | |
flex | File | 438728 bytes | October 12 2019 12:33:17. | |
flex++ | File | 438728 bytes | October 12 2019 12:33:17. | |
flock | File | 33992 bytes | April 06 2024 13:02:53. | |
fmt | File | 46664 bytes | April 01 2023 08:44:39. | |
fold | File | 42480 bytes | April 01 2023 08:44:39. | |
free | File | 21288 bytes | October 14 2023 20:31:02. | |
freetype-config | File | 4416 bytes | March 31 2025 19:37:30. | |
funzip | File | 37504 bytes | June 03 2025 02:10:12. | |
g++ | File | 1270688 bytes | March 31 2025 10:38:33. | |
gawk | File | 685848 bytes | April 18 2022 15:56:05. | |
gcc | File | 1266552 bytes | March 31 2025 10:38:36. | |
gcc-ar | File | 37536 bytes | March 31 2025 10:38:33. | |
gcc-nm | File | 37536 bytes | March 31 2025 10:38:36. | |
gcc-ranlib | File | 37536 bytes | March 31 2025 10:38:36. | |
gcov | File | 1377552 bytes | March 31 2025 10:38:36. | |
gcov-dump | File | 584584 bytes | March 31 2025 10:38:36. | |
gcov-tool | File | 622336 bytes | March 31 2025 10:38:36. | |
gem | File | 542 bytes | May 14 2025 12:40:38. | |
gencat | File | 25432 bytes | June 09 2025 20:31:29. | |
geoiplookup | File | 22416 bytes | November 28 2019 22:06:01. | |
geoiplookup6 | File | 22168 bytes | November 28 2019 22:06:01. | |
geqn | File | 237728 bytes | October 13 2019 14:29:41. | |
getconf | File | 33240 bytes | June 09 2025 20:31:29. | |
getent | File | 33920 bytes | June 09 2025 20:31:29. | |
getopt | File | 21016 bytes | April 06 2024 13:02:53. | |
ghostscript | File | 12648 bytes | June 03 2025 02:48:22. | |
git | File | 3845928 bytes | July 23 2025 06:59:57. | |
git-receive-pack | File | 3845928 bytes | July 23 2025 06:59:57. | |
git-shell | File | 2236688 bytes | July 23 2025 06:59:57. | |
git-upload-archive | File | 3845928 bytes | July 23 2025 06:59:57. | |
git-upload-pack | File | 3845928 bytes | July 23 2025 06:59:57. | |
gm | File | 8008 bytes | March 28 2022 15:50:37. | |
gmake | File | 240968 bytes | April 18 2022 16:38:34. | |
gneqn | File | 908 bytes | October 13 2019 14:29:37. | |
gnroff | File | 3312 bytes | October 13 2019 14:29:39. | |
gpg | File | 1090528 bytes | September 13 2022 10:15:05. | |
gpg-agent | File | 429352 bytes | September 13 2022 10:15:05. | |
gpg-error | File | 34976 bytes | October 12 2019 12:20:46. | |
gpg-zip | File | 3525 bytes | September 13 2022 10:15:00. | |
gpgsplit | File | 89104 bytes | September 13 2022 10:15:05. | |
gpgv | File | 462416 bytes | September 13 2022 10:15:05. | |
gpic | File | 300896 bytes | October 13 2019 14:29:41. | |
gprof | File | 105840 bytes | November 15 2024 09:59:32. | |
grep | File | 198280 bytes | October 11 2019 15:15:57. | |
groff | File | 127920 bytes | October 13 2019 14:29:41. | |
grops | File | 195728 bytes | October 13 2019 14:29:41. | |
grotty | File | 145304 bytes | October 13 2019 14:29:41. | |
groups | File | 38368 bytes | April 01 2023 08:44:39. | |
gs | File | 12648 bytes | June 03 2025 02:48:22. | |
gsnd | File | 277 bytes | June 03 2025 02:48:11. | |
gsoelim | File | 43576 bytes | October 13 2019 14:29:41. | |
gtar | File | 459768 bytes | June 11 2025 14:11:24. | |
gtbl | File | 158320 bytes | October 13 2019 14:29:41. | |
gtroff | File | 824344 bytes | October 13 2019 14:29:41. | |
gunzip | File | 2345 bytes | April 27 2022 05:49:28. | |
gzexe | File | 6375 bytes | April 27 2022 05:49:28. | |
gzip | File | 96944 bytes | April 27 2022 05:49:29. | |
h2ph | File | 29382 bytes | July 28 2025 08:08:32. | |
h2xs | File | 60866 bytes | July 28 2025 08:07:09. | |
head | File | 46672 bytes | April 01 2023 08:44:39. | |
hexdump | File | 58880 bytes | April 06 2024 13:02:53. | |
host | File | 145712 bytes | February 20 2025 09:05:41. | |
hostid | File | 34208 bytes | April 01 2023 08:44:39. | |
hostname | File | 21664 bytes | October 11 2019 13:06:51. | |
hunspell | File | 148168 bytes | October 13 2019 08:33:15. | |
iconv | File | 62912 bytes | June 09 2025 20:31:29. | |
id | File | 46608 bytes | April 01 2023 08:44:39. | |
identify | File | 12128 bytes | April 01 2025 13:15:58. | |
idn | File | 40352 bytes | October 13 2019 16:55:35. | |
ifnames | File | 4128 bytes | August 13 2024 19:30:48. | |
import | File | 12120 bytes | April 01 2025 13:15:58. | |
infocmp | File | 62512 bytes | October 14 2023 18:54:49. | |
infotocap | File | 87360 bytes | October 14 2023 18:54:49. | |
install | File | 160000 bytes | April 01 2023 08:44:39. | |
instmodsh | File | 4194 bytes | October 13 2019 08:55:21. | |
ionice | File | 29680 bytes | April 06 2024 13:02:53. | |
ipcrm | File | 29688 bytes | April 06 2024 13:02:53. | |
ipcs | File | 54672 bytes | April 06 2024 13:02:53. | |
isosize | File | 25472 bytes | April 06 2024 13:02:53. | |
ispell | File | 988 bytes | April 18 2022 15:10:51. | |
join | File | 55056 bytes | April 01 2023 08:44:39. | |
kill | File | 38168 bytes | April 06 2024 13:02:53. | |
ld | File | 1789096 bytes | November 15 2024 09:59:32. | |
ld.bfd | File | 1789096 bytes | November 15 2024 09:59:32. | |
ldd | File | 5441 bytes | June 09 2025 20:25:41. | |
less | File | 177928 bytes | July 02 2024 20:10:37. | |
lessecho | File | 12696 bytes | July 02 2024 20:10:37. | |
lesskey | File | 22520 bytes | July 02 2024 20:10:37. | |
lesspipe.sh | File | 3143 bytes | July 02 2024 19:57:10. | |
lex | File | 438728 bytes | October 12 2019 12:33:17. | |
libnetcfg | File | 15775 bytes | July 28 2025 08:08:32. | |
libtool | File | 367724 bytes | October 11 2019 14:55:28. | |
libtoolize | File | 129197 bytes | October 11 2019 14:55:28. | |
link | File | 34208 bytes | April 01 2023 08:44:39. | |
ln | File | 72264 bytes | April 01 2023 08:44:39. | |
locale | File | 57800 bytes | June 09 2025 20:31:29. | |
localedef | File | 314848 bytes | June 09 2025 20:31:29. | |
logger | File | 51184 bytes | April 06 2024 13:02:53. | |
login | File | 41944 bytes | April 06 2024 13:02:53. | |
logname | File | 34224 bytes | April 01 2023 08:44:39. | |
look | File | 16848 bytes | April 06 2024 13:02:53. | |
ls | File | 143328 bytes | April 01 2023 08:44:39. | |
lynx | File | 1928720 bytes | April 18 2022 21:01:05. | |
m4 | File | 190016 bytes | October 11 2019 14:41:40. | |
File | 418704 bytes | October 13 2019 00:19:50. | ||
mailx | File | 418704 bytes | October 13 2019 00:19:50. | |
make | File | 240968 bytes | April 18 2022 16:38:34. | |
make-dummy-cert | File | 610 bytes | October 09 2024 13:39:22. | |
mariadb | File | 4545824 bytes | May 28 2025 17:32:49. | |
mariadb-access | File | 111961 bytes | May 28 2025 17:32:49. | |
mariadb-admin | File | 4070888 bytes | May 28 2025 17:32:49. | |
mariadb-binlog | File | 4346304 bytes | May 28 2025 17:32:49. | |
mariadb-check | File | 4063880 bytes | May 28 2025 17:32:49. | |
mariadb-conv | File | 3764080 bytes | May 28 2025 17:32:49. | |
mariadb-convert-table-format | File | 4221 bytes | May 28 2025 17:32:49. | |
mariadb-dump | File | 4155560 bytes | May 28 2025 17:32:49. | |
mariadb-dumpslow | File | 8242 bytes | May 28 2025 17:32:49. | |
mariadb-embedded | File | 23688240 bytes | May 28 2025 17:32:49. | |
mariadb-find-rows | File | 3290 bytes | May 28 2025 17:32:49. | |
mariadb-hotcopy | File | 34973 bytes | May 28 2025 17:32:49. | |
mariadb-import | File | 4058696 bytes | May 28 2025 17:32:49. | |
mariadb-plugin | File | 3742920 bytes | May 28 2025 17:32:49. | |
mariadb-secure-installation | File | 13810 bytes | May 28 2025 17:32:49. | |
mariadb-setpermission | File | 17977 bytes | May 28 2025 17:32:49. | |
mariadb-show | File | 4053024 bytes | May 28 2025 17:32:49. | |
mariadb-slap | File | 4076624 bytes | May 28 2025 17:32:49. | |
mariadb-tzinfo-to-sql | File | 3738248 bytes | May 28 2025 17:32:49. | |
mariadb-waitpid | File | 3725568 bytes | May 28 2025 17:32:49. | |
mc | File | 1360320 bytes | October 18 2019 20:38:40. | |
mcdiff | File | 1360320 bytes | October 18 2019 20:38:40. | |
mcedit | File | 1360320 bytes | October 18 2019 20:38:40. | |
mcookie | File | 34056 bytes | April 06 2024 13:02:53. | |
mcview | File | 1360320 bytes | October 18 2019 20:38:40. | |
md5sum | File | 46712 bytes | April 01 2023 08:44:39. | |
mesg | File | 16752 bytes | April 06 2024 13:02:53. | |
mkdir | File | 84776 bytes | April 01 2023 08:44:39. | |
mkfifo | File | 68160 bytes | April 01 2023 08:44:39. | |
mknod | File | 72248 bytes | April 01 2023 08:44:39. | |
mktemp | File | 46832 bytes | April 01 2023 08:44:39. | |
mogrify | File | 12120 bytes | April 01 2025 13:15:58. | |
montage | File | 12120 bytes | April 01 2025 13:15:58. | |
more | File | 46016 bytes | April 06 2024 13:02:53. | |
msql2mysql | File | 1446 bytes | May 28 2025 17:32:49. | |
mv | File | 147488 bytes | April 01 2023 08:44:39. | |
my_print_defaults | File | 3730496 bytes | May 28 2025 17:32:49. | |
mysql | File | 4545824 bytes | May 28 2025 17:32:49. | |
mysql_config | File | 4622 bytes | May 28 2025 17:32:51. | |
mysql_find_rows | File | 3290 bytes | May 28 2025 17:32:49. | |
mysql_waitpid | File | 3725568 bytes | May 28 2025 17:32:49. | |
mysqlaccess | File | 111961 bytes | May 28 2025 17:32:49. | |
mysqladmin | File | 4070888 bytes | May 28 2025 17:32:49. | |
mysqlbinlog | File | 4346304 bytes | May 28 2025 17:32:49. | |
mysqlcheck | File | 4063880 bytes | May 28 2025 17:32:49. | |
mysqldump | File | 4155560 bytes | May 28 2025 17:32:49. | |
mysqlimport | File | 4058696 bytes | May 28 2025 17:32:49. | |
mysqlshow | File | 4053024 bytes | May 28 2025 17:32:49. | |
mytop | File | 73681 bytes | May 28 2025 17:32:49. | |
namei | File | 33896 bytes | April 06 2024 13:02:53. | |
nano | File | 253888 bytes | September 24 2024 02:16:19. | |
neqn | File | 908 bytes | October 13 2019 14:29:37. | |
nice | File | 38312 bytes | April 01 2023 08:44:39. | |
nl | File | 46720 bytes | April 01 2023 08:44:39. | |
nm | File | 51584 bytes | November 15 2024 09:59:32. | |
nohup | File | 38384 bytes | April 01 2023 08:44:39. | |
nproc | File | 38384 bytes | April 01 2023 08:44:39. | |
nroff | File | 3312 bytes | October 13 2019 14:29:39. | |
nslookup | File | 149768 bytes | February 20 2025 09:05:41. | |
nsupdate | File | 74808 bytes | February 20 2025 09:05:41. | |
numfmt | File | 67288 bytes | April 01 2023 08:44:39. | |
objcopy | File | 245832 bytes | November 15 2024 09:59:32. | |
objdump | File | 429832 bytes | November 15 2024 09:59:32. | |
od | File | 75656 bytes | April 01 2023 08:44:39. | |
openssl | File | 763856 bytes | October 09 2024 13:39:36. | |
pango-list | File | 12160 bytes | October 08 2021 15:22:06. | |
pango-view | File | 58816 bytes | October 08 2021 15:22:06. | |
passwd | File | 1044 bytes | April 18 2022 22:59:33. | |
paste | File | 38360 bytes | April 01 2023 08:44:39. | |
patch | File | 211416 bytes | June 01 2020 15:14:25. | |
pathchk | File | 38304 bytes | April 01 2023 08:44:39. | |
pdf2dsc | File | 698 bytes | June 03 2025 02:48:11. | |
pdf2ps | File | 909 bytes | June 03 2025 02:48:11. | |
perl | File | 12728 bytes | July 28 2025 08:07:20. | |
perl5.26.3 | File | 12728 bytes | July 28 2025 08:07:20. | |
perlbug | File | 45458 bytes | July 28 2025 08:08:32. | |
perldoc | File | 118 bytes | October 13 2019 11:53:57. | |
perlivp | File | 10813 bytes | July 28 2025 08:07:09. | |
perlml | File | 7024 bytes | August 10 2022 20:54:28. | |
perlthanks | File | 45458 bytes | July 28 2025 08:08:32. | |
pg_dump | File | 409016 bytes | February 27 2024 08:25:00. | |
pg_dumpall | File | 109680 bytes | February 27 2024 08:25:00. | |
pg_restore | File | 177504 bytes | February 27 2024 08:25:00. | |
pgrep | File | 29536 bytes | October 14 2023 20:31:02. | |
php | File | 937 bytes | April 03 2025 11:08:35. | |
pic | File | 300896 bytes | October 13 2019 14:29:41. | |
piconv | File | 8271 bytes | October 13 2019 08:46:10. | |
pinentry | File | 2404 bytes | August 12 2018 17:18:10. | |
pinentry-curses | File | 79760 bytes | November 24 2019 17:39:34. | |
ping | File | 67712 bytes | October 14 2023 17:19:01. | |
pinky | File | 42528 bytes | April 01 2023 08:44:39. | |
pip-3 | File | bytes | January 01 1970 00:00:00. | |
pip3 | File | bytes | January 01 1970 00:00:00. | |
pkg-config | File | 41000 bytes | October 13 2019 06:57:31. | |
pkgconf | File | 41000 bytes | October 13 2019 06:57:31. | |
pkill | File | 29536 bytes | October 14 2023 20:31:02. | |
pl2pm | File | 4533 bytes | July 28 2025 08:08:16. | |
pmap | File | 33568 bytes | October 14 2023 20:31:02. | |
pod2html | File | 4134 bytes | July 28 2025 08:08:32. | |
pod2man | File | 15034 bytes | October 13 2019 14:12:32. | |
pod2text | File | 10803 bytes | October 13 2019 14:12:32. | |
pod2usage | File | 3948 bytes | October 13 2019 11:57:18. | |
podchecker | File | 3658 bytes | October 13 2019 11:46:35. | |
podselect | File | 2527 bytes | October 13 2019 11:52:55. | |
post-grohtml | File | 244456 bytes | October 13 2019 14:29:41. | |
pr | File | 84200 bytes | April 01 2023 08:44:39. | |
pre-grohtml | File | 133688 bytes | October 13 2019 14:29:41. | |
precat | File | 5656 bytes | April 18 2022 15:10:50. | |
preunzip | File | 5656 bytes | April 18 2022 15:10:50. | |
prezip | File | 5656 bytes | April 18 2022 15:10:50. | |
prezip-bin | File | 12264 bytes | April 18 2022 15:10:53. | |
printenv | File | 34200 bytes | April 01 2023 08:44:39. | |
printf | File | 54928 bytes | April 01 2023 08:44:39. | |
prove | File | 13562 bytes | October 13 2019 12:42:34. | |
ps | File | 137984 bytes | October 14 2023 20:31:02. | |
ps2ascii | File | 631 bytes | June 03 2025 02:48:11. | |
ps2epsi | File | 2752 bytes | June 03 2025 02:48:11. | |
ps2pdf | File | 272 bytes | June 03 2025 02:48:11. | |
ps2pdf12 | File | 215 bytes | June 03 2025 02:48:11. | |
ps2pdf13 | File | 215 bytes | June 03 2025 02:48:11. | |
ps2pdf14 | File | 215 bytes | June 03 2025 02:48:11. | |
ps2pdfwr | File | 1097 bytes | June 03 2025 02:48:11. | |
ps2ps | File | 647 bytes | June 03 2025 02:48:11. | |
ps2ps2 | File | 669 bytes | June 03 2025 02:48:11. | |
psql | File | 659792 bytes | February 27 2024 08:25:00. | |
ptx | File | 79944 bytes | April 01 2023 08:44:39. | |
pwd | File | 38400 bytes | April 01 2023 08:44:39. | |
pwdx | File | 12984 bytes | October 14 2023 20:31:02. | |
pydoc-3 | File | bytes | January 01 1970 00:00:00. | |
pydoc3 | File | bytes | January 01 1970 00:00:00. | |
python2 | File | 8032 bytes | April 10 2024 04:58:50. | |
python2.7 | File | 8032 bytes | April 10 2024 04:58:50. | |
python3 | File | 11872 bytes | July 01 2025 22:14:50. | |
python3.6 | File | 11872 bytes | July 01 2025 22:14:50. | |
python3.6m | File | 11872 bytes | July 01 2025 22:14:50. | |
pyvenv-3 | File | bytes | January 01 1970 00:00:00. | |
ranlib | File | 63464 bytes | November 15 2024 09:59:32. | |
raw | File | 16888 bytes | April 06 2024 13:02:53. | |
readelf | File | 639528 bytes | November 15 2024 09:59:32. | |
readlink | File | 47064 bytes | April 01 2023 08:44:39. | |
realpath | File | 51216 bytes | April 01 2023 08:44:39. | |
recode | File | 48160 bytes | October 18 2019 15:18:02. | |
reindexdb | File | 72008 bytes | February 27 2024 08:25:00. | |
rename | File | 16896 bytes | April 06 2024 13:02:53. | |
renew-dummy-cert | File | 725 bytes | October 09 2024 13:39:22. | |
renice | File | 16856 bytes | April 06 2024 13:02:53. | |
replace | File | 3708040 bytes | May 28 2025 17:32:49. | |
reset | File | 25352 bytes | October 14 2023 18:54:49. | |
rev | File | 12752 bytes | April 06 2024 13:02:53. | |
rm | File | 72160 bytes | April 01 2023 08:44:39. | |
rmdir | File | 46632 bytes | April 01 2023 08:44:39. | |
rnano | File | 253888 bytes | September 24 2024 02:16:19. | |
rsync | File | 522392 bytes | June 03 2025 02:02:49. | |
ruby | File | 12128 bytes | May 14 2025 12:43:45. | |
run-with-aspell | File | 85 bytes | April 18 2022 15:10:50. | |
runcon | File | 38344 bytes | April 01 2023 08:44:39. | |
rvi | File | 1180368 bytes | August 02 2022 16:57:02. | |
rview | File | 1180368 bytes | August 02 2022 16:57:02. | |
rvim | File | 3067760 bytes | August 02 2022 16:57:02. | |
scalar | File | 2290912 bytes | July 23 2025 06:59:57. | |
scl | File | 37752 bytes | April 01 2023 16:10:31. | |
scl_enabled | File | 258 bytes | August 25 2017 08:23:02. | |
scl_source | File | 1863 bytes | April 01 2023 16:10:31. | |
scp | File | 105320 bytes | February 19 2025 20:59:40. | |
screen | File | 494040 bytes | May 05 2021 10:04:06. | |
script | File | 37672 bytes | April 06 2024 13:02:53. | |
sdiff | File | 107856 bytes | May 04 2020 15:15:14. | |
sed | File | 118248 bytes | April 18 2022 21:41:04. | |
selectorctl | File | 7812 bytes | July 11 2025 17:46:23. | |
seq | File | 54808 bytes | April 01 2023 08:44:39. | |
setsid | File | 16768 bytes | April 06 2024 13:02:53. | |
setterm | File | 46200 bytes | April 06 2024 13:02:53. | |
sftp | File | 163576 bytes | February 19 2025 20:59:40. | |
sh | File | 1150584 bytes | May 23 2024 08:55:42. | |
sha1sum | File | 46720 bytes | April 01 2023 08:44:39. | |
sha224sum | File | 46752 bytes | April 01 2023 08:44:39. | |
sha256sum | File | 46752 bytes | April 01 2023 08:44:39. | |
sha384sum | File | 46760 bytes | April 01 2023 08:44:39. | |
sha512sum | File | 46760 bytes | April 01 2023 08:44:39. | |
shred | File | 63424 bytes | April 01 2023 08:44:39. | |
shuf | File | 59560 bytes | April 01 2023 08:44:39. | |
size | File | 34048 bytes | November 15 2024 09:59:32. | |
skill | File | 29488 bytes | October 14 2023 20:31:02. | |
slabtop | File | 21344 bytes | October 14 2023 20:31:02. | |
sleep | File | 38368 bytes | April 01 2023 08:44:39. | |
snice | File | 29488 bytes | October 14 2023 20:31:02. | |
soelim | File | 43576 bytes | October 13 2019 14:29:41. | |
sort | File | 126512 bytes | April 01 2023 08:44:39. | |
spell | File | 122 bytes | April 18 2022 15:10:51. | |
splain | File | 19150 bytes | July 28 2025 08:08:32. | |
split | File | 59520 bytes | April 01 2023 08:44:39. | |
sprof | File | 29360 bytes | June 09 2025 20:31:29. | |
sqlite3 | File | 1346512 bytes | July 29 2025 01:27:56. | |
ssh | File | 775720 bytes | February 19 2025 20:59:40. | |
ssh-add | File | 354432 bytes | February 19 2025 20:59:40. | |
ssh-agent | File | 333392 bytes | February 19 2025 20:59:40. | |
ssh-copy-id | File | 10694 bytes | February 19 2025 20:59:39. | |
ssh-keygen | File | 437416 bytes | February 19 2025 20:59:40. | |
ssh-keyscan | File | 438856 bytes | February 19 2025 20:59:40. | |
stat | File | 88304 bytes | April 01 2023 08:44:39. | |
stdbuf | File | 50768 bytes | April 01 2023 08:44:39. | |
strace | File | 2029832 bytes | January 28 2025 01:32:17. | |
stream | File | 12112 bytes | April 01 2025 13:15:58. | |
strings | File | 38328 bytes | November 15 2024 09:59:32. | |
strip | File | 245856 bytes | November 15 2024 09:59:32. | |
stty | File | 79544 bytes | April 01 2023 08:44:39. | |
sum | File | 46704 bytes | April 01 2023 08:44:39. | |
sync | File | 38328 bytes | April 01 2023 08:44:39. | |
tabs | File | 16952 bytes | October 14 2023 18:54:49. | |
tac | File | 42568 bytes | April 01 2023 08:44:39. | |
tail | File | 75984 bytes | April 01 2023 08:44:39. | |
tar | File | 459768 bytes | June 11 2025 14:11:24. | |
taskset | File | 38144 bytes | April 06 2024 13:02:53. | |
tbl | File | 158320 bytes | October 13 2019 14:29:41. | |
tclsh | File | 9256 bytes | October 12 2019 00:25:32. | |
tclsh8.6 | File | 9256 bytes | October 12 2019 00:25:32. | |
tee | File | 42552 bytes | April 01 2023 08:44:39. | |
test | File | 54912 bytes | April 01 2023 08:44:39. | |
tic | File | 87360 bytes | October 14 2023 18:54:49. | |
timeout | File | 42936 bytes | April 01 2023 08:44:39. | |
tload | File | 17160 bytes | October 14 2023 20:31:02. | |
tmpwatch | File | 36320 bytes | October 12 2019 11:32:29. | |
toe | File | 16848 bytes | October 14 2023 18:54:49. | |
top | File | 124616 bytes | October 14 2023 20:31:02. | |
touch | File | 96272 bytes | April 01 2023 08:44:39. | |
tput | File | 25392 bytes | October 14 2023 18:54:49. | |
tr | File | 50896 bytes | April 01 2023 08:44:39. | |
traceroute | File | 72672 bytes | March 11 2025 07:45:53. | |
troff | File | 824344 bytes | October 13 2019 14:29:41. | |
true | File | 34200 bytes | April 01 2023 08:44:39. | |
truncate | File | 42432 bytes | April 01 2023 08:44:39. | |
tset | File | 25352 bytes | October 14 2023 18:54:49. | |
tsort | File | 42568 bytes | April 01 2023 08:44:39. | |
tty | File | 34192 bytes | April 01 2023 08:44:39. | |
tzselect | File | 15370 bytes | June 09 2025 20:25:25. | |
uapi | File | 1040 bytes | June 28 2025 23:07:04. | |
ul | File | 21072 bytes | April 06 2024 13:02:53. | |
uname | File | 38304 bytes | April 01 2023 08:44:39. | |
unexpand | File | 46776 bytes | April 01 2023 08:44:39. | |
uniq | File | 50912 bytes | April 01 2023 08:44:39. | |
unlink | File | 34216 bytes | April 01 2023 08:44:39. | |
unversioned-python | File | bytes | January 01 1970 00:00:00. | |
unzip | File | 206728 bytes | June 03 2025 02:10:12. | |
unzipsfx | File | 103912 bytes | June 03 2025 02:10:12. | |
uptime | File | 12888 bytes | October 14 2023 20:31:02. | |
users | File | 38368 bytes | April 01 2023 08:44:39. | |
utmpdump | File | 29344 bytes | April 06 2024 13:02:53. | |
vacuumdb | File | 80344 bytes | February 27 2024 08:25:00. | |
vdir | File | 143328 bytes | April 01 2023 08:44:39. | |
vi | File | 1180368 bytes | August 02 2022 16:57:02. | |
view | File | 1180368 bytes | August 02 2022 16:57:02. | |
vim | File | 3067760 bytes | August 02 2022 16:57:02. | |
vimdiff | File | 3067760 bytes | August 02 2022 16:57:02. | |
vimtutor | File | 2121 bytes | August 02 2022 16:56:59. | |
vmstat | File | 37672 bytes | October 14 2023 20:31:02. | |
watch | File | 29888 bytes | October 14 2023 20:31:02. | |
wc | File | 50912 bytes | April 01 2023 08:44:39. | |
wget | File | 533928 bytes | August 13 2024 22:22:56. | |
whereis | File | 29976 bytes | April 06 2024 13:02:53. | |
which | File | 30144 bytes | October 15 2023 02:50:46. | |
who | File | 54968 bytes | April 01 2023 08:44:39. | |
whoami | File | 34216 bytes | April 01 2023 08:44:39. | |
word-list-compress | File | 12280 bytes | April 18 2022 15:10:53. | |
x86_64-redhat-linux-c++ | File | 1270688 bytes | March 31 2025 10:38:33. | |
x86_64-redhat-linux-g++ | File | 1270688 bytes | March 31 2025 10:38:33. | |
x86_64-redhat-linux-gcc | File | 1266552 bytes | March 31 2025 10:38:36. | |
x86_64-redhat-linux-gcc-8 | File | 1266552 bytes | March 31 2025 10:38:36. | |
xargs | File | 75888 bytes | September 24 2024 02:19:34. | |
xmlcatalog | File | 20864 bytes | July 10 2025 07:02:26. | |
xmllint | File | 75128 bytes | July 10 2025 07:02:26. | |
xmlwf | File | 33752 bytes | April 15 2025 19:58:56. | |
xsltproc | File | 29152 bytes | June 09 2025 15:03:50. | |
xsubpp | File | 5080 bytes | October 13 2019 08:58:35. | |
xxd | File | 21016 bytes | August 02 2022 16:57:02. | |
yes | File | 34248 bytes | April 01 2023 08:44:39. | |
zcat | File | 1983 bytes | April 27 2022 05:49:28. | |
zcmp | File | 1677 bytes | April 27 2022 05:49:28. | |
zdiff | File | 5879 bytes | April 27 2022 05:49:28. | |
zegrep | File | 29 bytes | April 27 2022 05:49:28. | |
zfgrep | File | 29 bytes | April 27 2022 05:49:28. | |
zforce | File | 2080 bytes | April 27 2022 05:49:28. | |
zgrep | File | 7582 bytes | April 27 2022 05:49:28. | |
zip | File | 234496 bytes | October 11 2019 13:11:04. | |
zipcloak | File | 105376 bytes | October 11 2019 13:11:04. | |
zipgrep | File | 2953 bytes | October 10 2008 17:40:36. | |
zipinfo | File | 206728 bytes | June 03 2025 02:10:12. | |
zipnote | File | 100104 bytes | October 11 2019 13:11:04. | |
zipsplit | File | 100104 bytes | October 11 2019 13:11:04. | |
zless | File | 2205 bytes | April 27 2022 05:49:28. | |
zmore | File | 1841 bytes | April 27 2022 05:49:28. | |
znew | File | 4552 bytes | April 27 2022 05:49:28. | |
zsoelim | File | 43576 bytes | October 13 2019 14:29:41. |
#!/usr/bin/perl # Copyright (c) 2000, 2017, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; version 2 # of the License. # # 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # MA 02110-1335 USA use strict; use Getopt::Long; use Data::Dumper; use File::Basename; use File::Path; use DBI; use Sys::Hostname; use File::Copy; use File::Temp qw(tempfile); =head1 NAME mysqlhotcopy - fast on-line hot-backup utility for local MySQL databases and tables =head1 SYNOPSIS mysqlhotcopy db_name mysqlhotcopy --suffix=_copy db_name_1 ... db_name_n mysqlhotcopy db_name_1 ... db_name_n /path/to/new_directory mysqlhotcopy db_name./regex/ mysqlhotcopy db_name./^\(foo\|bar\)/ mysqlhotcopy db_name./~regex/ mysqlhotcopy db_name_1./regex_1/ db_name_1./regex_2/ ... db_name_n./regex_n/ /path/to/new_directory mysqlhotcopy --method='scp -Bq -i /usr/home/foo/.ssh/identity' --user=root --password=secretpassword \ db_1./^nice_table/ user@some.system.dom:~/path/to/new_directory WARNING: THIS PROGRAM IS STILL IN BETA. Comments/patches welcome. =cut # Documentation continued at end of file # fix CORE::GLOBAL::die to return a predictable exit code BEGIN { *CORE::GLOBAL::die= sub { warn @_; exit 1; }; } my $VERSION = "1.23"; my $opt_tmpdir = $ENV{TMPDIR} || "/tmp"; my $OPTIONS = <<"_OPTIONS"; $0 Ver $VERSION Usage: $0 db_name[./table_regex/] [new_db_name | directory] -?, --help display this help-screen and exit -u, --user=# user for database login if not current user -p, --password=# password to use when connecting to server (if not set in my.cnf, which is recommended) -h, --host=# hostname for local server when connecting over TCP/IP -P, --port=# port to use when connecting to local server with TCP/IP -S, --socket=# socket to use when connecting to local server --old_server connect to old MySQL-server (before v5.5) which doesn't have FLUSH TABLES WITH READ LOCK fully implemented. --allowold don\'t abort if target dir already exists (rename it _old) --addtodest don\'t rename target dir if it exists, just add files to it --keepold don\'t delete previous (now renamed) target when done --noindices don\'t include full index files in copy --method=# method for copy (only "cp" currently supported) -q, --quiet be silent except for errors --debug enable debug -n, --dryrun report actions without doing them --regexp=# copy all databases with names matching regexp --suffix=# suffix for names of copied databases --checkpoint=# insert checkpoint entry into specified db.table --flushlog flush logs once all tables are locked --resetmaster reset the binlog once all tables are locked --resetslave reset the master.info once all tables are locked --tmpdir=# temporary directory (instead of $opt_tmpdir) --record_log_pos=# record slave and master status in specified db.table --chroot=# base directory of chroot jail in which mysqld operates Try \'perldoc $0\' for more complete documentation _OPTIONS sub usage { die @_, $OPTIONS; } # Do not initialize user or password options; that way, any user/password # options specified in option files will be used. If no values are specified # at all, the defaults will be used (login name, no password). my %opt = ( noindices => 0, allowold => 0, # for safety keepold => 0, method => "cp", flushlog => 0, ); Getopt::Long::Configure(qw(no_ignore_case)); # disambiguate -p and -P GetOptions( \%opt, "help", "host|h=s", "user|u=s", "password|p=s", "port|P=s", "socket|S=s", "old_server", "allowold!", "keepold!", "addtodest!", "noindices!", "method=s", "debug", "quiet|q", "mv!", "regexp=s", "suffix=s", "checkpoint=s", "record_log_pos=s", "flushlog", "resetmaster", "resetslave", "tmpdir|t=s", "dryrun|n", "chroot=s", ) or usage("Invalid option"); # @db_desc # ========== # a list of hash-refs containing: # # 'src' - name of the db to copy # 't_regex' - regex describing tables in src # 'target' - destination directory of the copy # 'tables' - array-ref to list of tables in the db # 'files' - array-ref to list of files to be copied # 'index' - array-ref to list of indexes to be copied # my @db_desc = (); my $tgt_name = undef; usage("") if ($opt{help}); if ( $opt{regexp} || $opt{suffix} || @ARGV > 2 ) { $tgt_name = pop @ARGV unless ( exists $opt{suffix} ); @db_desc = map { s{^([^\.]+)\./(.+)/$}{$1}; { 'src' => $_, 't_regex' => ( $2 ? $2 : '.*' ) } } @ARGV; } else { usage("Database name to hotcopy not specified") unless ( @ARGV ); $ARGV[0] =~ s{^([^\.]+)\./(.+)/$}{$1}; @db_desc = ( { 'src' => $ARGV[0], 't_regex' => ( $2 ? $2 : '.*' ) } ); if ( @ARGV == 2 ) { $tgt_name = $ARGV[1]; } else { $opt{suffix} = "_copy"; } } my %mysqld_vars; my $start_time = time; $opt_tmpdir= $opt{tmpdir} if $opt{tmpdir}; $0 = $1 if $0 =~ m:/([^/]+)$:; $opt{quiet} = 0 if $opt{debug}; $opt{allowold} = 1 if $opt{keepold}; # --- connect to the database --- my $dsn; $dsn = ";host=" . (defined($opt{host}) ? $opt{host} : "localhost"); $dsn .= ";port=$opt{port}" if $opt{port}; $dsn .= ";mariadb_socket=$opt{socket}" if $opt{socket}; # use mariadb_read_default_group=mysqlhotcopy so that [client] and # [mysqlhotcopy] groups will be read from standard options files. my $dbh = DBI->connect("DBI:MariaDB:$dsn;mariadb_read_default_group=mysqlhotcopy", $opt{user}, $opt{password}, { RaiseError => 1, PrintError => 0, AutoCommit => 1, }); # --- check that checkpoint table exists if specified --- if ( $opt{checkpoint} ) { $opt{checkpoint} = quote_names( $opt{checkpoint} ); eval { $dbh->do( qq{ select time_stamp, src, dest, msg from $opt{checkpoint} where 1 != 1} ); }; die "Error accessing Checkpoint table ($opt{checkpoint}): $@" if ( $@ ); } # --- check that log_pos table exists if specified --- if ( $opt{record_log_pos} ) { $opt{record_log_pos} = quote_names( $opt{record_log_pos} ); eval { $dbh->do( qq{ select host, time_stamp, log_file, log_pos, master_host, master_log_file, master_log_pos from $opt{record_log_pos} where 1 != 1} ); }; die "Error accessing log_pos table ($opt{record_log_pos}): $@" if ( $@ ); } # --- get variables from database --- my $sth_vars = $dbh->prepare("show variables like 'datadir'"); $sth_vars->execute; while ( my ($var,$value) = $sth_vars->fetchrow_array ) { $mysqld_vars{ $var } = $value; } my $datadir = $mysqld_vars{'datadir'} || die "datadir not in mysqld variables"; $datadir= $opt{chroot}.$datadir if ($opt{chroot}); $datadir =~ s:/$::; # --- get target path --- my ($tgt_dirname, $to_other_database); $to_other_database=0; if (defined($tgt_name) && $tgt_name =~ m:^\w+$: && @db_desc <= 1) { $tgt_dirname = "$datadir/$tgt_name"; $to_other_database=1; } elsif (defined($tgt_name) && ($tgt_name =~ m:/: || $tgt_name eq '.')) { $tgt_dirname = $tgt_name; } elsif ( $opt{suffix} ) { print "Using copy suffix '$opt{suffix}'\n" unless $opt{quiet}; } else { $tgt_name="" if (!defined($tgt_name)); die "Target '$tgt_name' doesn't look like a database name or directory path.\n"; } # --- resolve database names from regexp --- if ( defined $opt{regexp} ) { my $t_regex = '.*'; if ( $opt{regexp} =~ s{^/(.+)/\./(.+)/$}{$1} ) { $t_regex = $2; } my $sth_dbs = $dbh->prepare("show databases"); $sth_dbs->execute; while ( my ($db_name) = $sth_dbs->fetchrow_array ) { next if $db_name =~ m/^information_schema$/i; push @db_desc, { 'src' => $db_name, 't_regex' => $t_regex } if ( $db_name =~ m/$opt{regexp}/o ); } } # --- get list of tables and views to hotcopy --- my $hc_locks = ""; my $hc_tables = ""; my $hc_base_tables = ""; my $hc_views = ""; my $num_base_tables = 0; my $num_views = 0; my $num_tables = 0; my $num_files = 0; foreach my $rdb ( @db_desc ) { my $db = $rdb->{src}; my @dbh_base_tables = get_list_of_tables( $db ); my @dbh_views = get_list_of_views( $db ); ## filter out certain system non-lockable tables. ## keep in sync with mysqldump. if ($db =~ m/^mysql$/i) { @dbh_base_tables = grep { !/^(apply_status|schema|general_log|slow_log|transaction_registry)$/ } @dbh_base_tables } ## generate regex for tables/files my $t_regex; my $negated; if ($rdb->{t_regex}) { $t_regex = $rdb->{t_regex}; ## assign temporary regex $negated = $t_regex =~ s/^~//; ## note and remove negation operator $t_regex = qr/$t_regex/; ## make regex string from ## user regex ## filter (out) tables specified in t_regex print "Filtering tables with '$t_regex'\n" if $opt{debug}; @dbh_base_tables = ( $negated ? grep { $_ !~ $t_regex } @dbh_base_tables : grep { $_ =~ $t_regex } @dbh_base_tables ); ## filter (out) views specified in t_regex print "Filtering tables with '$t_regex'\n" if $opt{debug}; @dbh_views = ( $negated ? grep { $_ !~ $t_regex } @dbh_views : grep { $_ =~ $t_regex } @dbh_views ); } ## Now concatenate the base table and view arrays. my @dbh_tables = (@dbh_base_tables, @dbh_views); ## get list of files to copy my $db_dir = "$datadir/$db"; opendir(DBDIR, $db_dir ) or die "Cannot open dir '$db_dir': $!"; my %db_files; while ( defined( my $name = readdir DBDIR ) ) { $db_files{$name} = $1 if ( $name =~ /(.+)\.\w+$/ ); } closedir( DBDIR ); unless( keys %db_files ) { warn "'$db' is an empty database\n"; } ## filter (out) files specified in t_regex my @db_files; if ($rdb->{t_regex}) { @db_files = ($negated ? grep { $db_files{$_} !~ $t_regex } keys %db_files : grep { $db_files{$_} =~ $t_regex } keys %db_files ); } else { @db_files = keys %db_files; } @db_files = sort @db_files; my @index_files=(); ## remove indices unless we're told to keep them if ($opt{noindices}) { @index_files= grep { /\.(ISM|MYI)$/ } @db_files; @db_files = grep { not /\.(ISM|MYI)$/ } @db_files; } $rdb->{files} = [ @db_files ]; $rdb->{index} = [ @index_files ]; my @hc_base_tables = map { quote_names("$db.$_") } @dbh_base_tables; my @hc_views = map { quote_names("$db.$_") } @dbh_views; my @hc_tables = (@hc_base_tables, @hc_views); $rdb->{tables} = [ @hc_tables ]; $hc_locks .= ", " if ( length $hc_locks && @hc_tables ); $hc_locks .= join ", ", map { "$_ READ" } @hc_tables; $hc_base_tables .= ", " if ( length $hc_base_tables && @hc_base_tables ); $hc_base_tables .= join ", ", @hc_base_tables; $hc_views .= ", " if ( length $hc_views && @hc_views ); $hc_views .= join " READ, ", @hc_views; @hc_tables = (@hc_base_tables, @hc_views); $num_base_tables += scalar @hc_base_tables; $num_views += scalar @hc_views; $num_tables += $num_base_tables + $num_views; $num_files += scalar @{$rdb->{files}}; } # --- resolve targets for copies --- if (defined($tgt_name) && length $tgt_name ) { # explicit destination directory specified # GNU `cp -r` error message die "copying multiple databases, but last argument ($tgt_dirname) is not a directory\n" if ( @db_desc > 1 && !(-e $tgt_dirname && -d $tgt_dirname ) ); if ($to_other_database) { foreach my $rdb ( @db_desc ) { $rdb->{target} = "$tgt_dirname"; } } elsif ($opt{method} =~ /^scp\b/) { # we have to trust scp to hit the target foreach my $rdb ( @db_desc ) { $rdb->{target} = "$tgt_dirname/$rdb->{src}"; } } else { die "Last argument ($tgt_dirname) is not a directory\n" if (!(-e $tgt_dirname && -d $tgt_dirname ) ); foreach my $rdb ( @db_desc ) { $rdb->{target} = "$tgt_dirname/$rdb->{src}"; } } } else { die "Error: expected \$opt{suffix} to exist" unless ( exists $opt{suffix} ); foreach my $rdb ( @db_desc ) { $rdb->{target} = "$datadir/$rdb->{src}$opt{suffix}"; } } print Dumper( \@db_desc ) if ( $opt{debug} ); # --- bail out if all specified databases are empty --- die "No tables to hot-copy" unless ( length $hc_locks ); # --- create target directories if we are using 'cp' --- my @existing = (); if ($opt{method} =~ /^cp\b/) { foreach my $rdb ( @db_desc ) { push @existing, $rdb->{target} if ( -d $rdb->{target} ); } if ( @existing && !($opt{allowold} || $opt{addtodest}) ) { $dbh->disconnect(); die "Can't hotcopy to '", join( "','", @existing ), "' because directory\nalready exist and the --allowold or --addtodest options were not given.\n" } } retire_directory( @existing ) if @existing && !$opt{addtodest}; foreach my $rdb ( @db_desc ) { my $tgt_dirpath = "$rdb->{target}"; # Remove trailing slashes (needed for Mac OS X) substr($tgt_dirpath, 1) =~ s|/+$||; if ( $opt{dryrun} ) { print "mkdir $tgt_dirpath, 0750\n"; } elsif ($opt{method} =~ /^scp\b/) { ## assume it's there? ## ... } else { mkdir($tgt_dirpath, 0750) or die "Can't create '$tgt_dirpath': $!\n" unless -d $tgt_dirpath; my @f_info= stat "$datadir/$rdb->{src}"; chown $f_info[4], $f_info[5], $tgt_dirpath; } } ############################## # --- PERFORM THE HOT-COPY --- # # Note that we try to keep the time between the LOCK and the UNLOCK # as short as possible, and only start when we know that we should # be able to complete without error. # read lock all the tables we'll be copying # in order to get a consistent snapshot of the database if ( $opt{checkpoint} || $opt{record_log_pos} ) { # convert existing READ lock on checkpoint and/or log_pos table into WRITE lock foreach my $table ( grep { defined } ( $opt{checkpoint}, $opt{record_log_pos} ) ) { $hc_locks .= ", $table WRITE" unless ( $hc_locks =~ s/$table\s+READ/$table WRITE/ ); } } my $hc_started = time; # count from time lock is granted if ( $opt{dryrun} ) { if ( $opt{old_server} ) { print "LOCK TABLES $hc_locks\n"; print "FLUSH TABLES /*!32323 $hc_tables */\n"; } else { # Lock base tables and views separately. print "FLUSH TABLES $hc_base_tables WITH READ LOCK\n" if ( $hc_base_tables ); print "LOCK TABLES $hc_views READ\n" if ( $hc_views ); } print "FLUSH LOGS\n" if ( $opt{flushlog} ); print "RESET MASTER\n" if ( $opt{resetmaster} ); print "RESET SLAVE\n" if ( $opt{resetslave} ); } else { my $start = time; if ( $opt{old_server} ) { $dbh->do("LOCK TABLES $hc_locks"); printf "Locked $num_tables tables in %d seconds.\n", time-$start unless $opt{quiet}; $hc_started = time; # count from time lock is granted # flush tables to make on-disk copy up to date $start = time; $dbh->do("FLUSH TABLES /*!32323 $hc_tables */"); printf "Flushed tables ($hc_tables) in %d seconds.\n", time-$start unless $opt{quiet}; } else { # Lock base tables and views separately, as 'FLUSH TABLES <tbl_name> # ... WITH READ LOCK' (introduced in 5.5) would fail for views. # Also, flush tables to make on-disk copy up to date $dbh->do("FLUSH TABLES $hc_base_tables WITH READ LOCK") if ( $hc_base_tables ); printf "Flushed $num_base_tables tables with read lock ($hc_base_tables) in %d seconds.\n", time-$start unless $opt{quiet}; $start = time; $dbh->do("LOCK TABLES $hc_views READ") if ( $hc_views ); printf "Locked $num_views views ($hc_views) in %d seconds.\n", time-$start unless $opt{quiet}; $hc_started = time; # count from time lock is granted } $dbh->do( "FLUSH LOGS" ) if ( $opt{flushlog} ); $dbh->do( "RESET MASTER" ) if ( $opt{resetmaster} ); $dbh->do( "RESET SLAVE" ) if ( $opt{resetslave} ); if ( $opt{record_log_pos} ) { record_log_pos( $dbh, $opt{record_log_pos} ); $dbh->do("FLUSH TABLES /*!32323 $hc_tables */"); } } my @failed = (); foreach my $rdb ( @db_desc ) { my @files = map { "$datadir/$rdb->{src}/$_" } @{$rdb->{files}}; next unless @files; eval { copy_files($opt{method}, \@files, $rdb->{target}); }; push @failed, "$rdb->{src} -> $rdb->{target} failed: $@" if ( $@ ); @files = @{$rdb->{index}}; if ($rdb->{index}) { copy_index($opt{method}, \@files, "$datadir/$rdb->{src}", $rdb->{target} ); } if ( $opt{checkpoint} ) { my $msg = ( $@ ) ? "Failed: $@" : "Succeeded"; eval { $dbh->do( qq{ insert into $opt{checkpoint} (src, dest, msg) VALUES ( '$rdb->{src}', '$rdb->{target}', '$msg' ) } ); }; if ( $@ ) { warn "Failed to update checkpoint table: $@\n"; } } } if ( $opt{dryrun} ) { print "UNLOCK TABLES\n"; if ( @existing && !$opt{keepold} ) { my @oldies = map { $_ . '_old' } @existing; print "rm -rf @oldies\n" } $dbh->disconnect(); exit(0); } else { $dbh->do("UNLOCK TABLES"); } my $hc_dur = time - $hc_started; printf "Unlocked tables.\n" unless $opt{quiet}; # # --- HOT-COPY COMPLETE --- ########################### $dbh->disconnect; if ( @failed ) { # hotcopy failed - cleanup # delete any @targets # rename _old copy back to original my @targets = (); foreach my $rdb ( @db_desc ) { push @targets, $rdb->{target} if ( -d $rdb->{target} ); } print "Deleting @targets \n" if $opt{debug}; print "Deleting @targets \n" if $opt{debug}; rmtree([@targets]); if (@existing) { print "Restoring @existing from back-up\n" if $opt{debug}; foreach my $dir ( @existing ) { rename("${dir}_old", $dir ) or warn "Can't rename ${dir}_old to $dir: $!\n"; } } die join( "\n", @failed ); } else { # hotcopy worked # delete _old unless $opt{keepold} if ( @existing && !$opt{keepold} ) { my @oldies = map { $_ . '_old' } @existing; print "Deleting previous copy in @oldies\n" if $opt{debug}; rmtree([@oldies]); } printf "$0 copied %d tables (%d files) in %d second%s (%d seconds overall).\n", $num_tables, $num_files, $hc_dur, ($hc_dur==1)?"":"s", time - $start_time unless $opt{quiet}; } exit 0; # --- sub copy_files { my ($method, $files, $target) = @_; my @cmd; print "Copying ".@$files." files...\n" unless $opt{quiet}; if ($method =~ /^s?cp\b/) # cp or scp with optional flags { my $cp = $method; # add option to preserve mod time etc of copied files # not critical, but nice to have $cp.= " -p" if $^O =~ m/^(solaris|linux|freebsd|darwin)$/; # add recursive option for scp $cp.= " -r" if $^O =~ /m^(solaris|linux|freebsd|darwin)$/ && $method =~ /^scp\b/; # perform the actual copy safe_system( $cp, (map { "'$_'" } @$files), "'$target'" ); } else { die "Can't use unsupported method '$method'\n"; } } # # Copy only the header of the index file # sub copy_index { my ($method, $files, $source, $target) = @_; print "Copying indices for ".@$files." files...\n" unless $opt{quiet}; foreach my $file (@$files) { my $from="$source/$file"; my $to="$target/$file"; my $buff; open(INPUT, "<$from") || die "Can't open file $from: $!\n"; binmode(INPUT, ":raw"); my $length=read INPUT, $buff, 2048; die "Can't read index header from $from\n" if ($length < 1024); close INPUT; if ( $opt{dryrun} ) { print "$opt{method}-header $from $to\n"; } elsif ($opt{method} eq 'cp') { open(OUTPUT,">$to") || die "Can\'t create file $to: $!\n"; if (syswrite(OUTPUT,$buff) != length($buff)) { die "Error when writing data to $to: $!\n"; } close OUTPUT || die "Error on close of $to: $!\n"; } elsif ($opt{method} =~ /^scp\b/) { my ($fh, $tmp)= tempfile('mysqlhotcopy-XXXXXX', DIR => $opt_tmpdir) or die "Can\'t create/open file in $opt_tmpdir\n"; if (syswrite($fh,$buff) != length($buff)) { die "Error when writing data to $tmp: $!\n"; } close $fh || die "Error on close of $tmp: $!\n"; safe_system("$opt{method} $tmp $to"); unlink $tmp; } else { die "Can't use unsupported method '$opt{method}'\n"; } } } sub safe_system { my @sources= @_; my $method= shift @sources; my $target= pop @sources; ## @sources = list of source file names ## We have to deal with very long command lines, otherwise they may generate ## "Argument list too long". ## With 10000 tables the command line can be around 1MB, much more than 128kB ## which is the common limit on Linux (can be read from ## /usr/src/linux/include/linux/binfmts.h ## see http://www.linuxjournal.com/article.php?sid=6060). my $chunk_limit= 100 * 1024; # 100 kB my @chunk= (); my $chunk_length= 0; foreach (@sources) { push @chunk, $_; $chunk_length+= length($_); if ($chunk_length > $chunk_limit) { safe_simple_system($method, @chunk, $target); @chunk=(); $chunk_length= 0; } } if ($chunk_length > 0) { # do not forget last small chunk safe_simple_system($method, @chunk, $target); } } sub safe_simple_system { my @cmd= @_; if ( $opt{dryrun} ) { print "@cmd\n"; } else { ## for some reason system fails but backticks works ok for scp... print "Executing '@cmd'\n" if $opt{debug}; my $cp_status = system "@cmd > /dev/null"; if ($cp_status != 0) { warn "Executing command failed ($cp_status). Trying backtick execution...\n"; ## try something else `@cmd` || die "Error: @cmd failed ($?) while copying files.\n"; } } } sub retire_directory { my ( @dir ) = @_; foreach my $dir ( @dir ) { my $tgt_oldpath = $dir . '_old'; if ( $opt{dryrun} ) { print "rmtree $tgt_oldpath\n" if ( -d $tgt_oldpath ); print "rename $dir, $tgt_oldpath\n"; next; } if ( -d $tgt_oldpath ) { print "Deleting previous 'old' hotcopy directory ('$tgt_oldpath')\n" unless $opt{quiet}; rmtree([$tgt_oldpath],0,1); } rename($dir, $tgt_oldpath) or die "Can't rename $dir=>$tgt_oldpath: $!\n"; print "Existing hotcopy directory renamed to '$tgt_oldpath'\n" unless $opt{quiet}; } } sub record_log_pos { my ( $dbh, $table_name ) = @_; eval { my ($file,$position) = get_row( $dbh, "show master status" ); die "master status is undefined" if !defined $file || !defined $position; my $row_hash = get_row_hash( $dbh, "show slave status" ); my ($master_host, $log_file, $log_pos ); if ( $dbh->{mariadb_serverinfo} =~ /^3\.23/ ) { ($master_host, $log_file, $log_pos ) = @{$row_hash}{ qw / Master_Host Log_File Pos / }; } else { ($master_host, $log_file, $log_pos ) = @{$row_hash}{ qw / Master_Host Relay_Master_Log_File Exec_Master_Log_Pos / }; } my $hostname = hostname(); $dbh->do( qq{ replace into $table_name set host=?, log_file=?, log_pos=?, master_host=?, master_log_file=?, master_log_pos=? }, undef, $hostname, $file, $position, $master_host, $log_file, $log_pos ); }; if ( $@ ) { warn "Failed to store master position: $@\n"; } } sub get_row { my ( $dbh, $sql ) = @_; my $sth = $dbh->prepare($sql); $sth->execute; return $sth->fetchrow_array(); } sub get_row_hash { my ( $dbh, $sql ) = @_; my $sth = $dbh->prepare($sql); $sth->execute; return $sth->fetchrow_hashref(); } sub get_list_of_tables { my ( $db ) = @_; my $tables = eval { $dbh->selectall_arrayref('SHOW FULL TABLES FROM ' . $dbh->quote_identifier($db) . ' WHERE Table_type = \'BASE TABLE\'') } || []; warn "Unable to retrieve list of tables in $db: $@" if $@; return (map { $_->[0] } @$tables); } sub get_list_of_views { my ( $db ) = @_; my $views = eval { $dbh->selectall_arrayref('SHOW FULL TABLES FROM ' . $dbh->quote_identifier($db) . ' WHERE Table_type = \'VIEW\'') } || []; warn "Unable to retrieve list of views in $db: $@" if $@; return (map { $_->[0] } @$views); } sub quote_names { my ( $name ) = @_; # given a db.table name, add quotes my ($db, $table, @cruft) = split( /\./, $name ); die "Invalid db.table name '$name'" if (@cruft || !defined $db || !defined $table ); # Earlier versions of DBD return table name non-quoted, # such as DBD-2.1012 and the newer ones, such as DBD-2.9002 # returns it quoted. Let's have a support for both. $table=~ s/\`//g; return "`$db`.`$table`"; } __END__ =head1 DESCRIPTION mysqlhotcopy is designed to make stable copies of live MySQL databases. Here "live" means that the database server is running and the database may be in active use. And "stable" means that the copy will not have any corruptions that could occur if the table files were simply copied without first being locked and flushed from within the server. =head1 OPTIONS =over 4 =item --checkpoint checkpoint-table As each database is copied, an entry is written to the specified checkpoint-table. This has the happy side-effect of updating the MySQL update-log (if it is switched on) giving a good indication of where roll-forward should begin for backup+rollforward schemes. The name of the checkpoint table should be supplied in database.table format. The checkpoint-table must contain at least the following fields: =over 4 time_stamp timestamp not null src varchar(32) dest varchar(60) msg varchar(255) =back =item --record_log_pos log-pos-table Just before the database files are copied, update the record in the log-pos-table from the values returned from "show master status" and "show slave status". The master status values are stored in the log_file and log_pos columns, and establish the position in the binary logs that any slaves of this host should adopt if initialised from this dump. The slave status values are stored in master_host, master_log_file, and master_log_pos, corresponding to the coordinates of the next to the last event the slave has executed. The slave or its siblings can connect to the master next time and request replication starting from the recorded values. The name of the log-pos table should be supplied in database.table format. A sample log-pos table definition: =over 4 CREATE TABLE log_pos ( host varchar(60) NOT null, time_stamp timestamp NOT NULL, log_file varchar(32) default NULL, log_pos int(11) default NULL, master_host varchar(60) NULL, master_log_file varchar(32) NULL, master_log_pos int NULL, PRIMARY KEY (host) ); =back =item --suffix suffix Each database is copied back into the originating datadir under a new name. The new name is the original name with the suffix appended. If only a single db_name is supplied and the --suffix flag is not supplied, then "--suffix=_copy" is assumed. =item --allowold Move any existing version of the destination to a backup directory for the duration of the copy. If the copy successfully completes, the backup directory is deleted - unless the --keepold flag is set. If the copy fails, the backup directory is restored. The backup directory name is the original name with "_old" appended. Any existing versions of the backup directory are deleted. =item --keepold Behaves as for the --allowold, with the additional feature of keeping the backup directory after the copy successfully completes. =item --addtodest Don't rename target directory if it already exists, just add the copied files into it. This is most useful when backing up a database with many large tables and you don't want to have all the tables locked for the whole duration. In this situation, I<if> you are happy for groups of tables to be backed up separately (and thus possibly not be logically consistent with one another) then you can run mysqlhotcopy several times on the same database each with different db_name./table_regex/. All but the first should use the --addtodest option so the tables all end up in the same directory. =item --flushlog Rotate the log files by executing "FLUSH LOGS" after all tables are locked, and before they are copied. =item --resetmaster Reset the bin-log by executing "RESET MASTER" after all tables are locked, and before they are copied. Useful if you are recovering a slave in a replication setup. =item --resetslave Reset the master.info by executing "RESET SLAVE" after all tables are locked, and before they are copied. Useful if you are recovering a server in a mutual replication setup. =item --regexp pattern Copy all databases with names matching the pattern. =item --regexp /pattern1/./pattern2/ Copy all tables with names matching pattern2 from all databases with names matching pattern1. For example, to select all tables which names begin with 'bar' from all databases which names end with 'foo': mysqlhotcopy --indices --method=cp --regexp /foo$/./^bar/ =item db_name./pattern/ Copy only tables matching pattern. Shell metacharacters ( (, ), |, !, etc.) have to be escaped (e.g., \). For example, to select all tables in database db1 whose names begin with 'foo' or 'bar': mysqlhotcopy --indices --method=cp db1./^\(foo\|bar\)/ =item db_name./~pattern/ Copy only tables not matching pattern. For example, to copy tables that do not begin with foo nor bar: mysqlhotcopy --indices --method=cp db1./~^\(foo\|bar\)/ =item -?, --help Display help-screen and exit. =item -u, --user=# User for database login if not current user. =item -p, --password=# Password to use when connecting to the server. Note that you are strongly encouraged *not* to use this option as every user would be able to see the password in the process list. Instead use the '[mysqlhotcopy]' section in one of the config files, normally /etc/my.cnf or your personal ~/.my.cnf. (See the chapter 'my.cnf Option Files' in the manual.) =item -h, -h, --host=# Hostname for local server when connecting over TCP/IP. By specifying this different from 'localhost' will trigger mysqlhotcopy to use TCP/IP connection. =item -P, --port=# Port to use when connecting to MySQL server with TCP/IP. This is only used when using the --host option. =item -S, --socket=# UNIX domain socket to use when connecting to local server. =item --old_server Use old server (pre v5.5) commands. =item --noindices Don\'t include index files in copy. Only up to the first 2048 bytes are copied; You can restore the indexes with isamchk -r or myisamchk -r on the backup. =item --method=# Method for copy (only "cp" currently supported). Alpha support for "scp" was added in November 2000. Your experience with the scp method will vary with your ability to understand how scp works. 'man scp' and 'man ssh' are your friends. The destination directory _must exist_ on the target machine using the scp method. --keepold and --allowold are meaningless with scp. Liberal use of the --debug option will help you figure out what\'s really going on when you do an scp. Note that using scp will lock your tables for a _long_ time unless your network connection is _fast_. If this is unacceptable to you, use the 'cp' method to copy the tables to some temporary area and then scp or rsync the files at your leisure. =item -q, --quiet Be silent except for errors. =item --debug Debug messages are displayed. =item -n, --dryrun Display commands without actually doing them. =back =head1 WARRANTY This software is free and comes without warranty of any kind. You should never trust backup software without studying the code yourself. Study the code inside this script and only rely on it if I<you> believe that it does the right thing for you. Patches adding bug fixes, documentation and new features are welcome. Please send these to internals@lists.mysql.com. =head1 TO DO Extend the individual table copy to allow multiple subsets of tables to be specified on the command line: mysqlhotcopy db newdb t1 t2 /^foo_/ : t3 /^bar_/ : + where ":" delimits the subsets, the /^foo_/ indicates all tables with names beginning with "foo_" and the "+" indicates all tables not copied by the previous subsets. 'newdb' is either the name of the new database, or the full path name of the new database file. The database should not already exist. Add option to lock each table in turn for people who don\'t need cross-table integrity. Add option to FLUSH STATUS just before UNLOCK TABLES. Add support for other copy methods (e.g., tar to single file?). Add support for forthcoming MySQL ``RAID'' table subdirectory layouts. =head1 AUTHOR Tim Bunce Martin Waite - Added checkpoint, flushlog, regexp and dryrun options. Fixed cleanup of targets when hotcopy fails. Added --record_log_pos. RAID tables are now copied (don't know if this works over scp). Ralph Corderoy - Added synonyms for commands. Scott Wiersdorf - Added table regex and scp support. Monty - Working --noindex (copy only first 2048 bytes of index file). Fixes for --method=scp. Ask Bjoern Hansen - Cleanup code to fix a few bugs and enable -w again. Emil S. Hansen - Added resetslave and resetmaster. Jeremy D. Zawodny - Removed deprecated DBI calls. Fixed bug which resulted in nothing being copied when a regexp was specified but no database name(s). Martin Waite - Fix to handle database name that contains space. Paul DuBois - Remove end '/' from directory names.
SILENT KILLER Tool