mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 09:27:25 +00:00
backend: add db backup folder to config #344
This commit is contained in:
parent
4eb569c9ec
commit
826fbfb43d
3 changed files with 6 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
define('YIIMP_MYSQLDUMP_USER', 'root');
|
||||
define('YIIMP_MYSQLDUMP_PASS', '<my_mysql_password>');
|
||||
define('YIIMP_MYSQLDUMP_PATH', '/root/backup');
|
||||
|
||||
/* Keys required to create/cancel orders and access your balances/deposit addresses */
|
||||
define('EXCH_BITTREX_SECRET', '<my_bittrex_api_secret_key>');
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
|
||||
function BackendDoBackup()
|
||||
{
|
||||
$d = date('Y-m-d-H', time());
|
||||
$filename = "/root/backup/yaamp-$d.sql";
|
||||
|
||||
if (is_readable("/usr/bin/xz")) {
|
||||
$ziptool = "xz --threads=4"; $ext = ".xz";
|
||||
} else {
|
||||
|
@ -19,6 +16,9 @@ function BackendDoBackup()
|
|||
$user = YIIMP_MYSQLDUMP_USER;
|
||||
$pass = YIIMP_MYSQLDUMP_PASS;
|
||||
|
||||
$d = date('Y-m-d-H', time());
|
||||
$filename = YIIMP_MYSQLDUMP_PATH.DIRECTORY_SEPARATOR."$db-$d.sql";
|
||||
|
||||
if (1) {
|
||||
// faster on huge databases if the disk is fast (nvme), reduce the db lock time
|
||||
system("mysqldump -h $host -u$user -p$pass --skip-extended-insert $db > $filename");
|
||||
|
|
|
@ -11,6 +11,8 @@ if (!defined('YAAMP_DBNAME')) define('YAAMP_DBNAME', 'yaamp');
|
|||
if (!defined('YAAMP_DBUSER')) define('YAAMP_DBUSER', 'root');
|
||||
if (!defined('YAAMP_DBPASSWORD')) define('YAAMP_DBPASSWORD', '');
|
||||
|
||||
if (!defined('YIIMP_MYSQLDUMP_PATH')) define('YIIMP_MYSQLDUMP_PATH', '/root/backup');
|
||||
|
||||
if (!defined('YIIMP_PUBLIC_EXPLORER')) define('YIIMP_PUBLIC_EXPLORER', true);
|
||||
if (!defined('YIIMP_PUBLIC_BENCHMARK')) define('YIIMP_PUBLIC_BENCHMARK', false);
|
||||
if (!defined('YIIMP_FIAT_ALTERNATIVE')) define('YIIMP_FIAT_ALTERNATIVE', 'EUR');
|
||||
|
|
Loading…
Add table
Reference in a new issue