Old 08-23-2004, 04:43 AM   #16
F30R
Junior Member
ioFTPD Foundation User
 
Join Date: Jan 2004
Posts: 11
Default

[11:41:19] site backup
[11:41:21] 200-The system cannot find the file specified.
[11:41:21] 200-Invalid command.
[11:41:21] 200-Invalid command.
[11:41:21] 200-Not connected.
[11:41:21] 200-Not connected.
[11:41:21] 200-Not connected.
[11:41:21] 200-open xxx 21
[11:41:21] 200-backup
[11:41:21] 200-backup
[11:41:21] 200-cd c:\
[11:41:21] 200-del test.rar
[11:41:21] 200-put test.rar
[11:41:21] 200-bye
[11:41:21] 200-> ftp: socket :Unknown error number
[11:41:21] 200 Command successful.


my bat is :

@echo off
set RARPATH=c:\server\scripts
set NETWORKDRIVE=X:
if not exist %RARPATH%\rar.exe goto rarnotexist
if %2==FTP goto FTPT
if %2==ftp goto FTPT
if %6.==. goto usage
goto paramok
:FTPT
if %7.==. goto usage
aramok
REM Make the script running in background. Delete previous line
REM if you want to see FTP session or network drive copying
:updir
cd ..
if not exist c:\server\system\ioFTPD.exe goto updir
rd /s /q backup
md backup\etc
cd backup
md users
md groups
md ini
copy ..\etc\*.* .\etc >nul
copy ..\users\*.* .\users >nul
copy ..\groups\*.* .\groups >nul
copy ..\system\*.ini .\ini >nul
%RARPATH%\rar.exe a -s -inul -hp%6 %1.rar etc
%RARPATH%\rar.exe a -s -inul -hp%6 %1.rar users
%RARPATH%\rar.exe a -s -inul -hp%6 %1.rar groups
%RARPATH%\rar.exe a -s -inul -hp%6 %1.rar ini
if %2==SMB goto NetDrive
if %2==smb goto NetDrive
if %2==FTP goto ViaFTP
if %2==ftp goto ViaFTP
goto usage
:ViaFTP
echo open %3 %4>script.txt
echo %5 >>script.txt
echo %6 >>script.txt
echo cd %7 >> script.txt
echo del %1.rar >>script.txt
echo put %1.rar >>script.txt
echo bye >>script.txt
c:\winnt\system32\ftp.exe -s:script.txt
goto end
:NetDrive
net use %NETWORKDRIVE% %3 %6 /user:%5
net use %NETWORKDRIVE% %3 "" /user:%5
copy %1.rar %NETWORKDRIVE%
net use %NETWORKDRIVE% /delete /yes
goto end
:usage
if %1.==. goto notfirst
echo Parameters: SMB/FTP WhereToSend [Port] Login Pass Directory
echo.
goto cont
:notfirst
echo Usage: %0 FTPName SMB/FTP WhereToSend Port Login Pass Directory
echo.
echo FTPName Archive will have this name (pay attention, old one will be deleted)
:cont
echo SMB/FTP Send the file via a network drive (SMB) or FTP
echo WhereToSend Address where to send backup
echo if using SMB use \\adresse\share
echo Port Port of the FTP even if it's 21.
echo Don't give it if sending via network drive
echo Login Login of the FTP
echo Pass FTP and archive password
echo Directory Where to put archive (do not put any '/' or '\' at the begining)
goto end
:rarnotexist
echo Edit this script's second line and set RARPATH (directory where is rar.exe)
:end
cd..
if exist .\system\ioFTPD.exe rd /s /q backup
F30R is offline   Reply With Quote
Old 10-04-2005, 03:33 PM   #17
maX1mus
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2005
Posts: 29
Default

Wow nice script
Works flawless for us..
I have a question Mr_X, is it possible in an not too hard way to make folders inside the created folders..?
What im thinking of is making the structure of the backup as identical to the install as possible.
For easier use if you need to recover settings.
For example,
ioFTPD
ioFTPD\scripts
ioFTPD\scripts\warchive\*.*
ioFTPD\scripts\ioA\*.*
etc
I tried a lot with cd md and back but no luck
or even better, just backup whole scripts dir and folders inside,
into ioFTPD\scripts\

Next step and most wanted would be to backup whole C:\ioFTPD\*.* and C:\Windrop\*.*
Is this possible?

Many thanks - max
maX1mus is offline   Reply With Quote
Old 10-07-2005, 11:54 AM   #18
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

Yes, it's possible.
I think i'll redo it in C instead of batch (that has some limit).

It isn't necessary to backup whole ioftpd dir. The important things are config files.
Just make once a rar with ioftpd and eggdrop dir.
But i can add windrop conf and scripts to backup.
Mr_X is offline   Reply With Quote
Old 10-08-2005, 07:55 PM   #19
maX1mus
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2005
Posts: 29
Default

Thanks for the answer.
Well how you do is up to you, thats out of my league
Why i want to be able to backup whole ioFTPD and windrop is because after a while there has been a lot of changes to many scripts.
Could be rules welcome msg etc etc..
im thinking of running site backup scheduled maby once a week, and only most importent stuff, user groups and so on.
But maby do site backupall once a month or after a big update, or new scripts added.

thanks for sharing - max
maX1mus is offline   Reply With Quote
Old 11-02-2005, 06:48 PM   #20
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

Updated.
Backup also scripts directory.
Now backup recursively directories.
Mr_X is offline   Reply With Quote
Old 11-03-2005, 06:43 AM   #21
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

Just reupdated.
Was'nt copying recursively, fixed now.
If you downloaded 1.2, you can just change one line:
%EXEPATH%\robocopy.exe ..\scripts scripts >nul
by
%EXEPATH%\robocopy.exe ..\scripts scripts /e >nul
Mr_X is offline   Reply With Quote
Old 11-09-2005, 12:02 PM   #22
maX1mus
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2005
Posts: 29
Default

Works really nice
I have a question tho,..
When it sends the zip is that made by ioFTPD.exe or ?
I need to allow something in the firewall at one place cause the backup from it gets only 0byte, and without firewall it works ;S

thx - _lefkas
maX1mus is offline   Reply With Quote
Old 11-09-2005, 02:09 PM   #23
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

You need to allow ftp.exe from microsoft to access to Internet (and allowing it opening any port)
It can also be ioFTPD.exe but i'm not sure because you can connect to it (already allowed).
(I'm not in your firewall and i don't know the rules you use )
Mr_X is offline   Reply With Quote
Old 11-10-2005, 01:30 AM   #24
ChipMunk666
Senior Member
ioFTPD Foundation User
 
Join Date: Jun 2003
Posts: 220
Default

I have another suggestion which would make me happy
And maybe a lot of other users...
I use sharedb.And i am fairly new to this...
But there is one error i have many times and that's ioShareDB: error register user
I fix this to copy the userfile from the "hub" to the "slave".
Is there a way to schedule this backup and send this to several slaves and servers but not in rar file?
This would help me a lot and probably a lot of others aswell
ChipMunk666 is offline   Reply With Quote
Old 11-10-2005, 06:19 PM   #25
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

I tried to schedule backup but it always fail and I don't know why because it worked fine with SITE command. I spent lots of time to search from where it comes without success.
I don't have so much time these days to investigate, i have nearly all days 8AM->6PM during the week + works for school.
I can restart working on it at the beginning of february when my exams will be done.

You wanted to schedule this.
I can make something to schedule but not with ioFTPD schedule (don't work very good as I said): my own that will stay in memory (and maybe one that will be installable as a service also).

I could also make another version that will be included in Service (all in one)

About copying userfile, I don't think it's possible to do while io is running because it locks these files. You have to stop ioFTPD and decompress user files.
Perhaps I'm wrong, but in this case, tell me.
Mr_X is offline   Reply With Quote
Old 11-10-2005, 06:46 PM   #26
maX1mus
Junior Member
ioFTPD Foundation User
 
Join Date: Jul 2005
Posts: 29
Default

Quote:
Originally Posted by Mr_X
About copying userfile, I don't think it's possible to do while io is running because it locks these files. You have to stop ioFTPD and decompress user files.
Perhaps I'm wrong, but in this case, tell me.
Isnt that what the script does today? copy userfiles ..
maX1mus is offline   Reply With Quote
Old 11-10-2005, 07:56 PM   #27
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

Sorry, forgot to mention that i was speaking (the things you quoted) about fixing problem with ioShareDB (overwritings files in slaves)
Mr_X is offline   Reply With Quote
Old 11-10-2005, 08:51 PM   #28
ChipMunk666
Senior Member
ioFTPD Foundation User
 
Join Date: Jun 2003
Posts: 220
Default

Quote:
Originally Posted by Mr_X
I tried to schedule backup but it always fail and I don't know why because it worked fine with SITE command. I spent lots of time to search from where it comes without success.
I don't have so much time these days to investigate, i have nearly all days 8AM->6PM during the week + works for school.
I can restart working on it at the beginning of february when my exams will be done.

You wanted to schedule this.
I can make something to schedule but not with ioFTPD schedule (don't work very good as I said): my own that will stay in memory (and maybe one that will be installable as a service also).

I could also make another version that will be included in Service (all in one)

About copying userfile, I don't think it's possible to do while io is running because it locks these files. You have to stop ioFTPD and decompress user files.
Perhaps I'm wrong, but in this case, tell me.
i can copy it and replace it with no problem.It's ioshared remember
I can do this without stopping the servers.Eventually i do a restart anyway just to make sure it works
Would only be cool if a script or programm does for onece a day or so
No that it is so often that i get this error but better to make sure
ChipMunk666 is offline   Reply With Quote
Old 01-11-2013, 12:54 AM   #29
PSA9
Member
FlashFXP Registered User
ioFTPD Foundation User
 
PSA9's Avatar
 
Join Date: Apr 2006
Posts: 54
Default

could someone please post a link to v1.2.1 or tell me where i can download this! Thanks in advanced
PSA9 is offline   Reply With Quote
Reply

Tags
copy, ftp, rar, recursive, send

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:00 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)