Linux SFTP Backup via CronJob


Recommended Posts

BinaryData

Hello Neowin,

 

I currently own 3 SeedBoxes that host a variety of files and the group of people I work with are constantly adding new files to these servers. I currently host our storage server at my house, and I'm manually adding files.

 

Is it possible to use an FTP Program and run a cronjob to start downloads of new files every 24 hours? My next question is; will this take up a lot of physical resources?

 

 

I wasn't sure where to post this, under the Linux/Unix section or Under the Software section =/ Sorry mods if it's in the wrong section.

 

Edit:

I'm trying to avoid FTP, and use SFTP. I'd also like to avoid having to code my own application because I'm frustrated enough with libssh2.

  • Like 1
Link to post
Share on other sites
Unobscured Vision

Should be easy enough. Simply have it up-/down-load *.* in/from the master directory you want every such-and-such period of time. Should work as advertised.

 

You're gonna use a heck of a lot of bandwidth that way, so I suggest monitoring said directory/files for changes before downloading. Make it somewhat intelligent. ;) 

 

That's about the best you're going to get without using a larger piece of software to do it for you.

Link to post
Share on other sites
BinaryData
7 hours ago, Unobscured Vision said:

Should be easy enough. Simply have it up-/down-load *.* in/from the master directory you want every such-and-such period of time. Should work as advertised.

 

You're gonna use a heck of a lot of bandwidth that way, so I suggest monitoring said directory/files for changes before downloading. Make it somewhat intelligent. ;) 

 

That's about the best you're going to get without using a larger piece of software to do it for you.

Bandwidth isn't a problem. All the devices have gigabit unmetered. Well, at the end of this month my home connection will.

  • Like 1
Link to post
Share on other sites
  • 1 month later...
+BudMan

if your goal is keeping a copy of files/folders on your seedboxes on your box at home.  Why not just use something like rsync or even the bittorrent sync application.

Link to post
Share on other sites
imort
On 06.05.2016 at 5:23 PM, BinaryData said:

Is it possible to use an FTP Program and run a cronjob to start downloads of new files every 24 hours? My next question is; will this take up a lot of physical resources?

I wasn't sure where to post this, under the Linux/Unix section or Under the Software section =/ Sorry mods if it's in the wrong section.

 

Edit:

I'm trying to avoid FTP, and use SFTP. I'd also like to avoid having to code my own application because I'm frustrated enough with libssh2.

 

 

Hey

 

Why don't you use a 'rsync' or 'scp'?

Are you have Linux at the both sides? If so you can setup a rsync running by cron within a few minutes, take a look here for the few examples.

If not you can setup a SSH tunnel or VPN, mount your home computer shared folder and use rsync still.

 

If you need more help with that please feel free to ask.

 

 

Link to post
Share on other sites
BinaryData
On 6/15/2016 at 7:46 AM, BudMan said:

if your goal is keeping a copy of files/folders on your seedboxes on your box at home.  Why not just use something like rsync or even the bittorrent sync application.

Iirc, the seedbox company we used frowned upon rsync. I was trying to stick with sftp because it was already installed, and I could easily write a simple cronjob to connect, and download anything that was posted within 24 hours.

On 6/15/2016 at 9:40 AM, imort said:

 

Hey

 

Why don't you use a 'rsync' or 'scp'?

Are you have Linux at the both sides? If so you can setup a rsync running by cron within a few minutes, take a look here for the few examples.

If not you can setup a SSH tunnel or VPN, mount your home computer shared folder and use rsync still.

 

If you need more help with that please feel free to ask.

 

 

The server I'm wanting to pull from is CentOS 5.5 I believe, my Linux box runs SSH, and a Torrent Tracker. I've got it setup perfectly, so I'd rather NOT screw with it too much. I'd rather not break it.

 

I'll figure this out when life is settled more.

Link to post
Share on other sites
+BudMan
8 hours ago, BinaryData said:

Iirc, the seedbox company we used frowned upon rsync.

 

Huh??  It is installed, I just checked..

 

@xl-117 ~]$ rsync
rsync  version 3.0.6  protocol version 30
Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

 

Where would you have read that they didn't like rsync?

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.