Current time: 12-23-2024, 03:44 AM Hello There, Guest! (LoginRegister)


Post Reply 
rsync backup
Author Message
Kika Offline
Member
***

Posts: 293
Joined: Feb 2007
Reputation: 8
Post: #1
rsync backup
English version: http://www.isp-control.net/forum/rsync-b...l#pid33957

Megcsinaltam vegre a napi mentes modositasat az RC6-ban.

A modositas oka: tobb, mint 100GB-ot naponta tomoritgetni - nalam ennyi cucc van most fent - nem az a dolog, amit az almoskonyvek javasolnak (eroforras, sok IO muvelet, csak kopik az a hdd...). Ezert arra gondoltam, hogy a fajlokat rsync-kel fogom szinkronizalni, mert igy mindig csak a valtozast masolja at, ami sokkal gyorsabb es kevesbe nyirja a HDD-t is.

Termeszetesen hatranya is van a dolognak: tobb fajlbejegyzes, ill valamivel tobb tarteruletet foglal es persze az ispcp adminban a visszaallitas funkciot sem ennek kezelesere talaltak ki.

Lassuk be ez a mentes nem adatbiztonsag miatt keszitett mentes (azt masik szerverre illik), ez arra szolgal, hogy a felhasznalo ha valamit felulir veletlenul, akkor elo tudja kapni a tegnapi verziot. Arra szerintem alkalmasabb a fajl szintu mentes, hiszen ez altalaban csak nehany fajlt erint, szoval szerintem nem akkora baj, hogy az adminban a visszaallitas nem mukodik.


Ea akkor most kicsit reszletesebben, hogy mit is irtam at pontosan benne:

- iscp.conf-ban a ZIP értéke ezentúl lehet "rsync" is, akkor futnak le az altalam beleirt aprobb modositasok
- a fajlok mentese soran a backups/{DOMAIN_NAME} konyvtarba szinkronizalja a domain tartalmat. Elso alkalommal mindent atmasol, de masodik futasra mar csak a valtozasokat
- adatbazis mentesnel gzip-et keszit, ha a ZIP tipusa "rsync" (ez volt a szimpatikusabb nekem)
- a mentes vegen van egy ellenorzes, ami ellenorzi, hogy elkeszultek-e a backup fajlok, de mivel itt nincs konkret fajlnev, s igy nincs mit ellenorizni ezert ez a resz nem fut le rsync eseten.

A scriptet teszteltem, nalam gond nelkul fut. Inditasa: "ispcp-backup-all yes" paranccsal, ha megszakitjatok, akkor a /tmp-bol torolni kell a lock fajlt, hogy ujra lehessen futtatni.

Varom a velemenyeket, eszreveteleket.


Attached File(s)
.zip  ispcp-backup-all.zip (Size: 3.36 KB / Downloads: 50)
(This post was last modified: 10-19-2009 06:15 PM by Kika.)
08-07-2008 04:21 AM
Find all posts by this user Quote this message in a reply
Kika Offline
Member
***

Posts: 293
Joined: Feb 2007
Reputation: 8
Post: #2
RE: rsync backup (RC6 only)
Az elso mentes 2 ora alatt futott le (a tomoritessel meg sokkal tobb volt), a masodik mar csak 7 percet vett igenybe Wink
(This post was last modified: 08-07-2008 07:03 AM by Kika.)
08-07-2008 06:52 AM
Find all posts by this user Quote this message in a reply
nuno Offline
Junior Member
*

Posts: 92
Joined: Jun 2008
Reputation: 1
Post: #3
RE: rsync backup (RC6 only)
Kika Hi

how can i translate this to english? Smile

Nuno
08-07-2008 11:32 PM
Find all posts by this user Quote this message in a reply
Kika Offline
Member
***

Posts: 293
Joined: Feb 2007
Reputation: 8
Post: #4
RE: rsync backup (RC6 only)
The important parts of the first message:

I did the rsync backup modification in the RC6 backup script, because i had too many data for packing everything day by day (and maybe this will increase the lifetime of the HDDs). With this modification the first backup was 2 hours on my sytem (the gzip backup was much longer), but the second was only 7 minutes, because this script backup only the databases and the modificated files.

This script create a folder in the {$DOMAIN_DIR}/backups and syncronizing every file to it without the log and the phptmp.

The database backup will zipping with gzip (i like this, not the bzip2 Smile ).

If you download this script and change the "ZIP" type to "rsync" in the ispcp.conf than this method will run. I didn't touch the other methods.

Don't forget: the recovery function in the admin panel doesn't works with this method, but you can access for each file via FTP. I think that this is a good backup method if the user overwrite his files and he would like to recover that.


positvie:
- not use lot of resources for long time
- easy file recovery via ftp (don't need unpack the backup)
- decrease the fragmentation
- maybe increase the HDDs lifetime

negative:
- use more disk spaces (because not zipped)
- lot of small file on the disk


If you have any idea than write that please Smile
(This post was last modified: 08-08-2008 01:35 AM by Kika.)
08-08-2008 12:15 AM
Find all posts by this user Quote this message in a reply
nuno Offline
Junior Member
*

Posts: 92
Joined: Jun 2008
Reputation: 1
Post: #5
RE: rsync backup (RC6 only)
Kika

Thank you (you are fast Wink)
08-08-2008 12:29 AM
Find all posts by this user Quote this message in a reply
Kika Offline
Member
***

Posts: 293
Joined: Feb 2007
Reputation: 8
Post: #6
RE: rsync backup (RC6 only)
Kiprobalta valaki? Tapasztalatok, 5letek?

Az en 5letem: kette kene szedni az adatbazis es a fajlrendszer mentesi modjanak beallitasat az ispcp.conf-ban ($ZIP -> $BACKUP_DB; $BACKUP_FILES). Az 1.0-hoz keszulo modban mar ez meg lesz oldva. Ha valakinek van valami egyeb ohaja, sohaja ne fogja vissza magat Wink
(This post was last modified: 08-12-2008 04:32 PM by Kika.)
08-12-2008 04:31 PM
Find all posts by this user Quote this message in a reply
Kika Offline
Member
***

Posts: 293
Joined: Feb 2007
Reputation: 8
Post: #7
RE: rsync backup (RC6 only)
Nem tudom hasznalja-e valaki ezt a mentest, de ma talaltam egy ebbol adodo hibat a qouta-nal. Beleszamolja a mentest is a foglalt tarteruletbe. Egyszeru a hiba javitasa, a quota managerben ra kell keresni a "backups/" -re es az exclude-ot ugy kell atirni, hogy az adott konyvtarat ne hasznalja Smile
10-23-2008 09:43 AM
Find all posts by this user Quote this message in a reply
nemo Offline
Junior Member
*

Posts: 61
Joined: Oct 2008
Reputation: 0
Post: #8
RE: rsync backup (RC6 only)
(10-23-2008 09:43 AM)Kika Wrote:  Nem tudom hasznalja-e valaki ezt a mentest...

én még nem, de valószínüleg fogom Smile
10-23-2008 05:22 PM
Find all posts by this user Quote this message in a reply
Kika Offline
Member
***

Posts: 293
Joined: Feb 2007
Reputation: 8
Post: #9
RE: rsync backup (RC6 only)
Ha hasznalja valaki szoljon es felrakom az RC7-hez valot Wink
12-16-2008 07:47 AM
Find all posts by this user Quote this message in a reply
nemo Offline
Junior Member
*

Posts: 61
Joined: Oct 2008
Reputation: 0
Post: #10
RE: rsync backup (RC6 only)
(12-16-2008 07:47 AM)Kika Wrote:  Ha hasznalja valaki szoljon es felrakom az RC7-hez valot Wink
Én még ott tartok, hogy egyelöre folyamatosan tesztelem a szervert, föként a spamszürö részét. Ma - mint tudod Shy - felraktam az RC7-et, és a mentést is meg kellene oldani a közeljövöben. Tehát ha nem nagy meló, rakd fel légyszíves, s ahogy idöm lesz összebarkácsolom azzal is.
12-16-2008 08:40 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 3 Guest(s)