Klokjis Posted August 14, 2005 Report Share Posted August 14, 2005 reku varbuut varu paluugt lai kaads mani kaut bish apgaismo par cron'iem: lai izpildiitos funkcija - katru dienu piem - saRARot - mySQL db tabulu. izraku ka it kaa saakumaa telnetaa jaaieliek 'crontab -e'... kur lai telnet rauj? :D nu taalaak naak: 59 23 * * * funkcija un kaa lai noraada funkciju saRARot failu folderis/folderis2/folderis3/fails.xxx un saRARoto paarvilkt uz folderis/folderisA/fails.rar... varbuut pat vareetu vnk bez rar bet ar kopeeshanu... Link to comment Share on other sites More sharing options...
Delfins Posted August 15, 2005 Report Share Posted August 15, 2005 (edited) linux vai win? uz linux tas viss ir vienkārši. 59 23 * * * /var/www/mans.saits.lv/jobs/backup backup #!/bin/sh DB=databaseName DATADIR="/data/backups/mans.saits.lv" CTIME=`date +%Y-%m-%d_%H-%M-%S` BACKUP_DFILE="$DATADIR/data_$CTIME.sql" BACKUP_TFILE="$DATADIR/tables_$CTIME.sql" # Tables /usr/local/mysql/bin/mysqldump -n -d --add-drop-table -hlocalhost -u... -p... $DB > $BACKUP_TFILE # Data /usr/local/mysql/bin/mysqldump -hlocalhost -u... -p... -t $DB > $BACKUP_DFILE tālāk arhivēšana atkarīga ko tu gribi tieši pielietot tar/gz/bzip ... etc Edited August 15, 2005 by Delfins Link to comment Share on other sites More sharing options...
Recommended Posts