Backup Data RotorCMS - Visavi.net https://visavi.net/ RSS - Visavi.net https://visavi.net/assets/img/images/logo_small.png RSS - Visavi.net https://visavi.net/ [email protected] (admin) [email protected] (admin) Wed, 18 Dec 2024 21:09:54 +0300 Not run php script https://visavi.net/topics/15996/292638 Backup Data RotorCMS hugo Wed, 22 Dec 2010 16:43:11 +0300 Сообщения https://visavi.net/topics/15996/292638 up@ what N70 not support copy paste?? https://visavi.net/topics/15996/286432 Backup Data RotorCMS nybiru Fri, 10 Dec 2010 06:38:28 +0300 Сообщения https://visavi.net/topics/15996/286432 I need write in php please https://visavi.net/topics/15996/286012 Backup Data RotorCMS hugo Thu, 09 Dec 2010 04:05:16 +0300 Сообщения https://visavi.net/topics/15996/286012 please .zip code https://visavi.net/topics/15996/285560 Backup Data RotorCMS Удаленный Wed, 08 Dec 2010 14:16:27 +0300 Сообщения https://visavi.net/topics/15996/285560 Please write code in php https://visavi.net/topics/15996/285480 Backup Data RotorCMS hugo Wed, 08 Dec 2010 10:47:54 +0300 Сообщения https://visavi.net/topics/15996/285480 Zip code php please https://visavi.net/topics/15996/280625 Backup Data RotorCMS hugo Mon, 29 Nov 2010 15:04:04 +0300 Сообщения https://visavi.net/topics/15996/280625 <pre class="prettyprint">&lt;?php define (&quot;FILES_TO_KEEP&quot;, 5); define (&quot;BACKUP_PERIOD&quot;, 86400); // сутки define (&quot;DATABASE_CONF&quot;, &#039;mysql&#58;//mysql_login&#58;mysql_password&#64;mysql_server/database_name&#039;); define (&quot;BACKUP_FOLDER&quot;, &#039;./backup&#039; ); error_reporting(0); function cmp_file_times($t1, $t2) { if ($t1&#91;&#039;t&#039;] == $t2&#91;&#039;t&#039;]) return 0; return ($t1&#91;&#039;t&#039;] &gt; $t2&#91;&#039;t&#039;]) ? 1 &#58; -1; } function backup() { global $now; $file = BACKUP_FOLDER.&quot;/backup-&quot;.date(&quot;d-m-Y_H-i-s&quot;, $now).&quot;.sql&quot;; $db = parse_url(DATABASE_CONF); $db&#91;&#039;path&#039;] = substr($db&#91;&#039;path&#039;], 1); $q = &quot;mysqldump -u&quot;.$db&#91;&#039;user&#039;].&quot; -p&quot;.$db&#91;&#039;pass&#039;].&quot; -h&quot;.$db&#91;&#039;host&#039;].&quot; &quot;.$db&#91;&#039;path&#039;].&quot; &gt; &quot;; exec($q.$file.&quot;; gzip -f &quot;.$file); // убедитесь что функции &quot;mysqldump&quot; и &quot;gzip&quot; доступны в консоли. } $now = time(); clearstatcache(); $b_dir = dir(BACKUP_FOLDER); $b_files = array(); while($file = $b_dir-&gt;read()) { if (preg_match(&quot;/^backup-(\d+)-(\d+)-(\d+)_(\d+)-(\d+)-(\d+)/i&quot;, $file, $a)) { array_push($b_files, array(&#039;n&#039; =&gt; $file, &#039;t&#039; =&gt; mktime($a&#91;4], $a&#91;5], $a&#91;6], $a&#91;2], $a&#91;1], $a&#91;3]))); } } $b_dir-&gt;close(); $b_count_files = count($b_files); if ($b_count_files) { usort($b_files, &quot;cmp_file_times&quot;); if ($b_files&#91;$b_count_files - 1]&#91;&#039;t&#039;] &lt;= $now - BACKUP_PERIOD) { if ($b_count_files &gt;= FILES_TO_KEEP) { for ($i = 0; $i &lt; $b_count_files - FILES_TO_KEEP + 1; $i ++) { unlink(BACKUP_FOLDER.&quot;/&quot;.$b_files&#91;$i]&#91;&#039;n&#039;]); } } backup(); } }else { backup(); } ?&gt;</pre> https://visavi.net/topics/15996/280324 Backup Data RotorCMS Славик Sun, 28 Nov 2010 18:03:46 +0300 Сообщения https://visavi.net/topics/15996/280324 while only with help phpmyadmin https://visavi.net/topics/15996/280312 Backup Data RotorCMS mozzzg Sun, 28 Nov 2010 17:33:47 +0300 Сообщения https://visavi.net/topics/15996/280312 Share backup data mysql rotorcms! https://visavi.net/topics/15996/280245 Backup Data RotorCMS KareelKun Sun, 28 Nov 2010 15:30:23 +0300 Сообщения https://visavi.net/topics/15996/280245