Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upload backup via FTP/SFTP #11

Open
rechandler12 opened this issue May 16, 2021 · 7 comments
Open

Add upload backup via FTP/SFTP #11

rechandler12 opened this issue May 16, 2021 · 7 comments

Comments

@rechandler12
Copy link

Hi!
Could you add uploading file backup via FTP/SFTP protocol? It would required the file name was unique so I suggest to add pattern to the file name like yyyy-MM-dd or yyyy-MM-dd-hh-mm.

@beeyev
Copy link
Owner

beeyev commented May 16, 2021

Okay, I will (i hope lol) implement this feature in the next release.

@rechandler12
Copy link
Author

wow, great! Thanks

@BrandonSk
Copy link

BrandonSk commented Nov 11, 2021

Hi,
I added the FTP feature to the script. I do not want to create a separate fork for it and I'm happy to share the code here.
What is the best way to do that?
Cheers,
B.

PS: Nevermind, I made a fork here https://github.com/BrandonSk/Mikrotik-RouterOS-automatic-backup-and-update-With-FTP.
If you like the code, just merge it with the original. Cheers.

PS: As I tried to keep the original functionality intact, but add additional logic, it may not be the most efficient way to do it. I can imagine for future a selection of backup method and adjust the rest of the code accordingly. For me the FTP part works well. I did not test if all possible combinations of email/ftp backup and corresponding logic of the code works as expected.

@beeyev
Copy link
Owner

beeyev commented Nov 13, 2021

Hello @BrandonSk sorry for the delay with answer.
Thank you for implementing this feature, I will take a look and merge your changes.

@BrandonSk
Copy link

Hello @BrandonSk sorry for the delay with answer.
Thank you for implementing this feature, I will take a look and merge your changes.

Hi,
no problem.
I made a "v2" of the FTP feature. It now supports SFTP too.
I also made the modifications to the code I suggested above. Now basically you can at the beginning to select if you want to backup to (S)FTP, email, or both. I studied your script and I think the modifications should be fully compatible now.
I would already publish it here, but I just installed Sublime Merge and Sublime Text and I am trying to figure out how to get changes from one to another and then to github :) Hopefully on Sunday I will give you much better solution. Cheers.

@TerAnYu
Copy link

TerAnYu commented Nov 14, 2021

Пршу прощения что вклиниваюсь, могу дать небольшой набросок, как сделать бэкап всего содержимого корня (очень выручает когда с устройством что-то случается и можно полностью восстановить его функционал, правда это работает только для ftp (не было необходимости отправлять на почту)).
https://github.com/TerAnYu/mikrotik_ftp_backup

I apologize for wedging in, I can give a small sketch of how to make a backup of all the content of the root (it is very helpful when something happens to the device and it is possible to completely restore its functionality, although this only works for ftp (there was no need to send to mail)).
https://github.com/TerAnYu/mikrotik_ftp_backup

@BrandonSk
Copy link

Hello all,
I just sent a pull request, so @beeyev you should see that in your repo.
If you want to check it out at my fork, here's the link: https://github.com/BrandonSk/Mikrotik-RouterOS-automatic-backup-and-update-With-FTP/tree/ftp_v2

Cheers,
Branislav.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants