Folders syncronize - Backup Incremental

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

brunellopulix
Posts: 73
Joined: Sat Apr 24, 2010 10:17 am

Folders syncronize - Backup Incremental

Post by brunellopulix »

Hi

saving zip is definitely the best way, but if the data size and the better the significant incremental save.
I have my application which has reached 20 GB and I have developed a procedure for saving incremental certainly can be useful to others.

Happy Holidays!!

Brunello
Attachments
HMG_MYSYNC.zip
(956.23 KiB) Downloaded 655 times
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Folders syncronize - Backup Incremental

Post by esgici »

Hi Brunello

Thank you very much this valuable sharing :)

Viva HMG, viva frienship :D
Last edited by esgici on Tue Dec 25, 2012 11:39 am, edited 1 time in total.
Viva INTERNATIONAL HMG :D
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Folders syncronize - Backup Incremental

Post by Rathinagiri »

Looks promising. Thanks a lot.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Folders syncronize - Backup Incremental

Post by esgici »

Hi Brunello

I couldn't make a .zip :(

Require a "User Manual"

Regards
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Folders syncronize - Backup Incremental

Post by danielmaximiliano »

Brunello Hello, thank you very much for sharing.
I can compile the project from HMG.3.1.1, hit New Record, indicated the path of dbf tables, indicated the destination folder but does not save the data, different methods probe INC, Full, with the same result ZIP
I use Windows 7 Home Premium 64.

Hola Brunello , muchas gracias por compartir.
puedo compilar el proyecto desde HMG.3.1.1, presiono New Record, indico la ruta de las tablas dbf, indico la carpeta destino pero no guarda estos datos, probe los distintos metodos INC, Full, ZIP con el mismo resultado
utilizo Windows 7 Home Premiun 64.
Folders Synchronization_2012-12-25_10-37-28.jpg
Folders Synchronization_2012-12-25_10-37-28.jpg (54 KiB) Viewed 6954 times
New Record - Properties_2012-12-25_10-41-02.jpg
New Record - Properties_2012-12-25_10-41-02.jpg (17.92 KiB) Viewed 6954 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Folders syncronize - Backup Incremental

Post by esgici »

esgici wrote: Require a "User Manual" ...
... or a "Quick Start" guide,

or a "how to ..." guide into program itself ..

TIA
Viva INTERNATIONAL HMG :D
brunellopulix
Posts: 73
Joined: Sat Apr 24, 2010 10:17 am

Re: Folders syncronize - Backup Incremental

Post by brunellopulix »

Daniel:
have selected active?
Esgici:
how you've set?
Brunello
brunellopulix
Posts: 73
Joined: Sat Apr 24, 2010 10:17 am

Re: Folders syncronize - Backup Incremental

Post by brunellopulix »

I'll explain:
1. New record
2. select origin and target (empty fields Target and Origin will be ignored)
3. select the type of backup
4. save

when you want to save changes flag active in the "ON" switch on back page and press Save.
Will be processed only records "INC" and "FULL" with the active flag to "ON".
At the end automatically "ON" will be "OFF"

for zip passing on the page and press compress.
Will be processed only records type "ZIP" with the active flag to "ON".
At the end automatically "ON" will be "OFF"

Setting max zip zip files must be> 1.
He should be between 5 and 10.

This is because for personal experience staff I learned that only one backup file is suicide.
Remember when doing backups to floppies?
enough that only one was unreadable and farewell backup.

My 20 GB then save them incrementally on four different partitions in less than a minute. Several times a day.

Brunello
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Folders syncronize - Backup Incremental

Post by esgici »

Finally :!:

I got it :D

It seems that

- This software is more clever than I was expected; more details is more difficulties for user ;)
So needs a bit more user friendly UI...

- Recursive folder scans, multiple compressing methods...
may be soon a File Manager

- Harbour_Zip method require a bit more work: Windows doesn't recognize structure of .zip file, and show it as empty :(

Anyway this is a valuable work, useful utility, nice sharing;

thanks again :)

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
Steed
Posts: 427
Joined: Sat Dec 12, 2009 3:40 pm

Re: Folders syncronize - Backup Incremental

Post by Steed »

Brunello

I'd make some changes in your code to avoid errors when some file is not copied to the target, due to some permissions.

Code: Select all

4 #xcommand TRY              => BEGIN SEQUENCE WITH { |oErr| Break( oErr ) }
5 #xcommand CATCH [<!oErr!>] => RECOVER [USING <oErr>] <-oErr->
6 #xcommand FINALLY          => ALWAYS
and to keep the date of the file in the target folder equal to the origen file

and another litte update "Do events" to avoid freezing while big files are being copied
FUNCTION CopyFileOK( src, dst )

local lOk2
private dDate,cTime

IF !('\' $ src)
src := SET(_SET_DEFAULT) + '\' + src
ENDIF
IF !('\' $ dst)
dst := SET(_SET_DEFAULT) + '\' + dst
ENDIF
TRY
lOk2:= HB_FCOPY( src, dst)
HB_FGETDATETIME( src , @dDate, @cTime )
hb_FSetDateTime( dst , @dDate, @cTime )
CATCH
lOk2:=.F.
END
Do Events
RETURN lOk2

Regards,

Ed
Attachments
HMG_MYSYNC.rar
(8.13 KiB) Downloaded 553 times
Post Reply