Ja zkusim jet na maximum.. .
Do vykonnosti se pustim zase zitra.
K zalohovani..
Zapisuji posledni zazalohovane $TO.
Pokud jiz odzalohovane dany den bylo, skript se ukonci:
FROM: Sun Jun 1 00:00:00 CEST 2014
TO: Mon Jun 2 00:00:00 CEST 2014
LAST: Mon Jun 2 00:00:00 CEST 2014
Backup has already been created...
LAST equal TO
Pokud chybi nekolik dni, pouzije se jako FROM posledni ulozeny LAST:
# /root/bin/backupdb
FROM: Sun Jun 1 00:00:00 CEST 2014
TO: Mon Jun 2 00:00:00 CEST 2014
LAST: Thu May 1 00:00:00 CEST 2014
Some backups are missing...
FROM NEW: Thu May 1 00:00:00 CEST 2014
connected to: 127.0.0.1
2014-06-02T21:05:54.866+0200 DATABASE: mentat to /var/tmp/20140602/mentat
2014-06-02T21:05:54.867+0200 mentat.alerts to /var/tmp/20140602/mentat/alerts.bson
2014-06-02T21:05:57.005+0200 Collection File Writing Progress: 264000/95696238 0% (documents)
...
Pridan i prefix:
root@mentat:/var/backups# ls -alh mongodb_*
-rw-r--r-- 1 root root 114M May 28 14:00 mongodb_20140528.tgz
-rw-r--r-- 1 root root 93M May 29 00:00 mongodb_20140529.tgz
-rw-r--r-- 1 root root 76M May 30 00:00 mongodb_20140530.tgz
-rw-r--r-- 1 root root 104M May 31 00:00 mongodb_20140531.tgz
-rw-r--r-- 1 root root 84M Jun 1 00:00 mongodb_20140601.tgz
-rw-r--r-- 1 root root 80M Jun 2 00:00 mongodb_20140602.tgz
-rw-r--r-- 1 root root 11 Jun 2 18:19 mongodb_last
Ale to je jen tak ve strucnosti. Proste jsem to ted vecer prekopal.. .
Uvidime zitrejsi ranni vypis.
R.