New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
You can simply add users with no shell for sFTP.
why would you need a script for that
sFTP is a lot easier to setup. Indeed, as @serverian said, setup an account for them without shell access.
For FTP I recommend using Virtualmin, saved me a lot of headaches. Just disable all the other services you don't need.
Same goes for quota/bw limitation settings. Using virtualmin. Don't make things harder as they should be Of course, if you have enough RAM.
You already have everything you need. Just use internal-sftp with ChrootDirectory and --shell /bin/false
mind that you need real sshd and not dropbear.
sorry i meant to using vsftp - lowend scripts having vsftpd on board.. since i heard vsftp is fast, uses less memory and safe..
FTP isn't safe.
http://wiki.hetzner.de/index.php/Tartarus_Backup-Konfiguration/en
Sftp is safe
http://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol
vsftpd supports TLS/SSL for login, so credentials are not sent in the clear. Configure it in the daemon and then use an FTP client that supports it, e.g. Filezilla.
FTP is significantly faster and lighter than sFTP when transferring numerous files and/or large files, or with multiple simultaneous users.
If you can use something different than FTP/sFTP, like ssh, you can just setup some ssh users with keys and use Duplicity as the backup client, no VPS configuration except ssh required: https://raymii.org/s/tutorials/Website-and-database-backup-with-Duplicity.html
What he said, you'd be surprised how many typical end users get their hosting and files all screwed up because of some trojan listening to the unencrypted FTP password being sent out on port 21, an then telling all their bot-buddies to login and infect shit.
But yea adding a user to a system you can simply just SFTP/SCP in via the SSH credentials, which would normally be tied to their home folder (with permissions to any other folder you granted that user access to).
Far as the script part, I guess the only reason I can think of a script would be to automate some things like pre-packing certain files, or dumping databases, or other processes before doing a backup procedure.
While you can do FTPS (FTP+SSL)... someone who has to ask this question probably won't set up an FTP server and permissions correctly when could just get it done with SSH. Plus the SSH deaemon is already running.
Besides I prefer using paired key authentication myself anyways.
SSH is preinstalled "most" of the time
why install another program when there is sftp that do what you needed?
Just because someone doesn't know how to do something doesn't mean they are incapable of doing it. It's called learning.
Because FTP is faster and uses less overhead than SSH on a multi-user system.
Ftp It...
Great read, @Raymii !! Keep up the good work, very informative.
You can use rsnapshot. Very easy to use:
http://abdussamad.com/archives/361-Automating-incremental-backups-with-Rsnapshot.html
Thanks @sleddog , personally i use rsync for VPS/server backups. Even for cPanel servers i have recovered/duplicated whole server using rsync backup sometime in past.
My 1st level of Backups are by control Panel - cPanel/ DirectAdmin/ kloxo
2nd level i use rsync script + mysqldump
Duplicity turorial by @Raymii i have read b4, its seems good though haven't tried.
rsnapshot i had tried b4, though don't remember why i didn't continue using it, most probably i likes my rsync scripts :P
But rsync/duplicity/ rsnapshot is not going to solve my purpose.
I want to give some backup space from my vps to my clients (few concerned clients of wordpress) and instead of giving them plain FTP space i wanted to use vsftp.
sFTP I didn't like because of overheads + i don't want anyone unnecessary going near the inner circle (touching the SSH demon - when its good its deamon )
Anyway for vsftp, i saw this article which got me going quickly on a freshly installed Debian on a LEB... http://hafizbadrie.wordpress.com/2011/03/17/setting-up-ftp-server-on-debian/
why you don't BTSync it, it use torrent though with SHA256 if I'm not mistaken
cuz client needs to backup from within Wordpress admin (using backup plugins with FTP option) or cPanel Backup (FTP option)
There are many cool WP backup plugins. The ones I tried and recommend are BackWpUp and UpdraftPlus. These can backup the database as well as the WP folders with customization and scheduling. I use them to backup to dropbox, sugarsync and google drive with auto schedule.
EDIT: I just realized that my post does not help with OP's requirement