Koozali.org formerly Contribs.org

HUGE PROPS - Backup2 Coder

HUGE PROPS - Backup2 Coder
« Reply #30 on: March 21, 2006, 10:56:06 AM »
Darrell,

Once again, great contrib!

Two minor requests though...

1) Is is possible to make the name of the backup folders customisable i.e. instead of a random 6 digit number we could have 'daily_backup', or 'ibays_backup' something like that?

2) Any chance of changing (Or allowing an option to change) the filename format from American (MM-DD-YY) to the ISO8601 standard of (YYYY-MM-DD)

The former is confusing to anyone who isn't American, and doesn't name-sort correctly if you have backups over more than one year.

If either of these can be changed with a template then please give me the ritual kick in the head and I'll do it myself!  :-D

Thanks Darrell!
...
Nick

"No good deed goes unpunished." :-x...

Offline dmay

  • *
  • 450
    • http://myezserver.com
HUGE PROPS - Backup2 Coder
« Reply #31 on: March 27, 2006, 09:44:42 PM »
Quote from: "NickCritten"
1) Is is possible to make the name of the backup folders customisable i.e. instead of a random 6 digit number we could have 'daily_backup', or 'ibays_backup' something like that?

The answer to every 'Is it possible' is almost always 'yes'. However this would not be a minor rewrite. I do like your examples. To make this work easier spaces would best be prohibited. Currently the job number is very important (ie 911). I'd have to add some new fields to make this work. Drop job number and replace with job name. Add a 911 enable/disable field.

Quote from: "NickCritten"
2) Any chance of changing (Or allowing an option to change) the filename format from American (MM-DD-YY) to the ISO8601 standard of (YYYY-MM-DD)

This is much easier to accomplish. Requires a line item edit to the backup2-backup action script replacing the current $Date entry %m.%d.%y with %Y.%m.%d. Note the capitalization. You would also need to manually edit the panel text.

I'm slowly... working on rewriting this contrib in FormMagick. I'll consider both of these for inclusion.

Darrell

HUGE PROPS - Backup2 Coder
« Reply #32 on: March 28, 2006, 02:45:14 PM »
Excellent Stuff,

I'll have a go at 'hacking' the second one myself, using your instructions and I eagerly await your rewrite! :-)
...
Nick

"No good deed goes unpunished." :-x...

Offline Daniel B.

  • *
  • 1,697
    • Firewall Services, la sécurité des réseaux
HUGE PROPS - Backup2 Coder
« Reply #33 on: March 28, 2006, 06:08:57 PM »
I'm looking for a backup solution on SME7rc1 and backup2 seems the best i tried, the scripts are very clear and quite easy to personalize (I say quite 'cause I'm a newbe). thanks darell for this contrib.
The reason I want to personalize it is that there's a problem if we want to backup files to an ibay of an other SME server: the share name is the name of the ibay (for example an ibay called backup) but we must write in the "backup/files" directory. So when I start the backup, it return an error.
I also heard there was an rsync support in older version of the contrib, and I'd like to have a look on it but I don't know where to find it. If someone could help me.
just a last question: darell, why did you use rar witch is non-free instead tar.gz?
C'est la fin du monde !!! :lol:

Offline dmay

  • *
  • 450
    • http://myezserver.com
HUGE PROPS - Backup2 Coder
« Reply #34 on: March 28, 2006, 08:48:30 PM »
Quote from: "VIP-ire"
backup files to an ibay

Read this thread. Don't use ibays for sme2sme.

http://forums.contribs.org/index.php?topic=31309.0

Quote from: "VIP-ire"
I also heard there was an rsync support in older version of the contrib?

I dropped this a long time ago. This is on the drawing board now:

http://bugs.contribs.org/show_bug.cgi?id=1093

Quote from: "VIP-ire"
why did you use rar witch is non-free instead tar.gz?

Search the BugTracker, forums & mailing list as this has been discussed many times before. Nothing currently matches RAR's features for workstation backup. If anyone finds anything GPL that will (and can prove it) I'll happily switch. This has been discussed in the BugTracker 7.x Future.

Darrell

Offline Daniel B.

  • *
  • 1,697
    • Firewall Services, la sécurité des réseaux
HUGE PROPS - Backup2 Coder
« Reply #35 on: April 11, 2006, 06:40:35 PM »
I had a look at the "backup2-backup" script , and I tried to had some features like:
 -backing up from or to an ibay
 -to a local directory
 -from or to an ssh location (only with RSA authentication)
 -from a smb share (to save some client files)
 With this, we could not only save files from the server but configure an SME server to save everything we want, even other server's config over the net. As I'm working in a office wich install and manage SME servers for SOHO, I think this could be usefull.
The script seems to work (I just made a few test, I'm still working on it and there're probably some bug) but I must modify the pannel. I've started to modify it but I heard that the e-smith::cgi module will be replaced by e-smith::Formmagik on futur versions, so I don't think spending time on that is interesting. I saw that you are rewriting it in FormMagik Darell. Don't know if you're interested in this features but if you're not, I'm interested in having a look at your new panel even if it's not finished 'cause I don't quite understand formmagik for now.

(sorry for the mistakes)
C'est la fin du monde !!! :lol:

kangkc

HUGE PROPS - Backup2 Coder
« Reply #36 on: April 12, 2006, 03:41:46 AM »
Thanks to dmay for the wonder script. I have added in a "backup2dvd" options which basically mkisofs the rar backup file into iso image and burn that onto CD.

It works pretty well (with some hard coding of device) on CD-RW. I can backup and restore using CD-RW.

When I start testing with DVD,  it failed when writing. The problem is not with the script but rather the cdrecord package with CentOS.

Anyone has succesfully implemented using cdrecord to burn DVD on SME7RC1?  It works fine with CD but not with DVD. Tested with DVD-R and DVD-RW.

HUGE PROPS - Backup2 Coder
« Reply #37 on: April 12, 2006, 08:25:10 AM »
kangkc, can you please share with us EXACTLY what you did to get the CD to work.
Thanks
Peter
...

Offline Tib

  • *
  • 571
    • http://www.tibors.net
HUGE PROPS - Backup2 Coder
« Reply #38 on: April 12, 2006, 01:53:45 PM »
Hi

I have been playing arround with backup2 and find it's very nice.

One question though ... is it possible to restore one file only ... but without the whole directory structure included.

Every time I restore to a different location it restores the whole diredtory structure as well.

Regards,

Tib

HUGE PROPS - Backup2 Coder
« Reply #39 on: April 12, 2006, 02:17:19 PM »
Quote from: "Tib"
Hi

I have been playing arround with backup2 and find it's very nice.

One question though ... is it possible to restore one file only ... but without the whole directory structure included.

Every time I restore to a different location it restores the whole diredtory structure as well.

Regards,

Tib


Tib,

Just use WinRAR to open the rar file, then drag out the file you want, and manually copy back onto your SME using SCP / SFTP or drop into an Ibay using SMB.

I'm assuming of course that you use Windows on one of your client machines.. If not you are on your own! :-)

Personally I use WinRAR on all my machines.. Its Waaaay better in my opinion than WinZip (And can handle just about every compression format I've ever heard of)  Plus it doesn't have that annoying habit of WinZips where it doesn't show you the directory tree when opening up an archive.
...
Nick

"No good deed goes unpunished." :-x...

Offline Tib

  • *
  • 571
    • http://www.tibors.net
HUGE PROPS - Backup2 Coder
« Reply #40 on: April 12, 2006, 02:26:59 PM »
NickCritten

LOL ... thats a good point ... must be getting late ... I should have thought of that myself.

I backup to a linux machine not an XP machine ... I hate XP ... only use it when I really have to ... and that is probably about 5% of the time.

Linux of course has rar as well so there are no problems in that department.

Thanks,

Tib

Offline dmay

  • *
  • 450
    • http://myezserver.com
HUGE PROPS - Backup2 Coder
« Reply #41 on: April 13, 2006, 08:20:01 PM »
Quote from: "VIP-ire"
Darell. Don't know if you're interested in this features but if you're not, I'm interested in having a look at your new panel even if it's not finished 'cause I don't quite understand formmagik for now.

(sorry for the mistakes)

I'd be happy to look at your additions. At the moment I'm 75% complete on my FM rewrite. Open a backup2 bug report and post your changes here:

http://bugs.contribs.org/enter_bug.cgi?product=SME%20Contribs

Darrell

Offline Daniel B.

  • *
  • 1,697
    • Firewall Services, la sécurité des réseaux
HUGE PROPS - Backup2 Coder
« Reply #42 on: April 14, 2006, 12:36:33 PM »
thx for your attention dmay. hope I filled the bug repport correctly, it's the first time for me.
If someone else want to try the modifications i've done, you can download http://firewall-services.com/sme/files/backup2ws.tar.gz
this archive contain two script one called backup2-backup and the other called backup2.
You can install the dmay contrib normally and replace the scripts /etc/e-smith/events/actions/backup2-backup and /etc/e-smith/web/functions/backup2 by those in the archive. there's no restor support for now, it's just for testing the backup featurs.
There's still some bugs, you're prevented. Any comment is wellcome.
C'est la fin du monde !!! :lol: