Linux SFTP Backup via CronJob


Recommended Posts

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 comment
https://www.neowin.net/forum/topic/1296722-linux-sftp-backup-via-cronjob/
Share on other sites

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.

  On 06/05/2016 at 18:15, 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.

Expand  

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

  • Like 1
  • 1 month later...
  On 06/05/2016 at 11:23, 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.

Expand  
 

 

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.

 

 

  On 15/06/2016 at 14:46, 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.

Expand  

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 15/06/2016 at 16:40, 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.

 

 

Expand  

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.

  On 19/06/2016 at 01:53, BinaryData said:

Iirc, the seedbox company we used frowned upon rsync.

 

Expand  

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?

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • NTLite 2025.07.10541 by Razvan Serea NTLite is a Windows configuration tool that allows you to modify your existing Windows install or an image yet to be deployed, remove Windows components, configure and integrate, speed up the Windows deployment process. Reduce Windows footprint on your RAM and storage drive memory. Remove components of your choice, guarded by compatibility safety mechanisms, which speed up finding that sweet spot. Windows Unattended feature support, providing many commonly used options on a single page for easy setup. Easily integrate a single or multiple drivers, update or language packages. Package integration features smart sorting, enabling you to seamlessly add packages for integration and the tool will apply them in the appropriate order, keeping hotfix compatibility in check. One of the important new features of NTLite (compared to its predecessors) is the ability to modify an already installed the operating system, by removing unnecessary components. Supports Windows 11, 10, 8.1 and 7, x86 and x64, live and image. Server editions of the same versions, excluding support for component removals and feature configuration. ARM64 image support in the alpha stage. Does not support Checked/Debug, Embedded, IoT editions, nor Vista or XP. NTLite 2025.07.10541 changelog: Upgrade UI: Accessibility improvements, e.g. ribbon and page refocusing on Alt, status readout UI-Translation: Thanks for Hungarian (John), Italian (clarensio), Russian (RDS) Fix Components: Edge Canary initial start crash after removing WLAN and Autopilot together Download: NTLite 64-bit | 21.5 MB (Free, paid upgrade available) Download: NTLite 32-bit | 19.3 MB Link: NTLite Home Page | NTLite Features | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • I have the money, so I could've done that, but I also just spent nearly $2700 [Canadian] on a laptop, so I wanted to save money.
    • I wonder how would this machine perform with Linux on it, like Ubuntu or Fedora?
    • Mass Image Compressor 4.0.2 by Razvan Serea Mass Image Compressor is a fast and easy-to-use Windows app that helps you compress, resize, and convert large sets of images quickly. The tool supports various formats including JPEG, PNG, WebP, AVIF, and GIF (including animated images), and offers precise control over output quality, image dimensions, and file naming schemes. You can reduce file sizes while keeping good quality, change image dimensions, and rename files in batches. Users can filter or preserve metadata such as EXIF, IPTC, and XMP—including selectively removing GPS or serial number information. With features like drag-and-drop, Explorer integration, multiple output folder options, and lossless optimization tools like OxiPNG and pngquant, Mass Image Compressor is ideal for photographers, designers, and developers. Features Compress multiple folders and files in one go (including optional subfolders) Seamless Windows Explorer integration via the "Send To" menu Advanced metadata copy settings (EXIF, XMP, IPTC) with filtering (e.g., strip GPS, serial numbers) Full support for Animated Images (GIF, PNG, WebP) Output to modern formats like WebP and AVIF Regex filters for filenames and size-based exclusions Suffix/Prefix options and filename text replacement for output files Powerful Preview UI with pixel-level image comparison (CTRL + T) Robust and faster RAW image support Multiple flexible output destination modes: Replace original files Output to specific folder Store next to original with suffix/prefix Inside a Compressed subfolder Flexible resizing: By percentage Long edge, fixed width/height Frame-based for print or responsive image sets (1x/2x/3x) Mass Image Compressor 4.0.2 release notes: Major Release: 4.x Series Rewritten from the ground up Complete rewrite using a modern architecture for improved scalability, performance, and responsive UI. Expanded format support: Input: JPG, PNG, WebP, TIFF, GIF, BMP, AVIF, HEIC, JP2, RAW (ARW, DNG, NEF, CR2, CR3, CRW, DCR, KDC, MRW, ORF, RAF, PEF, RW2, SRW, ERF, 3FR, MOS, MEF). Output: JPG, PNG, WebP, AVIF, GIF. New features: Animated image handling (e.g., animated WebP and GIF) Side-by-side preview for compression comparison File filters by extension, size, and visibility Multi-file drag and drop Gallery view modes for better browsing Rich compression settings (quality, resizing strategies, naming rules) Flexible output management (replace originals, custom folders, or preserve structure) Smart conflict handling with detailed warnings Throttled task scheduling for smoother UI Improved metadata support with options to preserve or exclude (e.g., GPS, camera info) Dependency Updates & Stability Magick.NET-Q8-OpenMP-x64 updated from 14.5.0 to 14.7.0 (resolves hang and security issues) Microsoft App SDK updated from 1.6.250108002 to 1.7.250606001 (stability improvements) Download: Mass Image Compressor 4.0.2 | 81.9 MB (Open Source) Download: Mass Image Compressor Portable | 114.0 MB View: Mass Image Compressor Home Page | Github | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • One Year In
      Schwarzenbach earned a badge
      One Year In
    • Collaborator
      NullReference earned a badge
      Collaborator
    • Dedicated
      John Volks earned a badge
      Dedicated
    • One Month Later
      KenKay earned a badge
      One Month Later
    • Week One Done
      KenKay earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      664
    2. 2
      ATLien_0
      250
    3. 3
      Xenon
      178
    4. 4
      neufuse
      153
    5. 5
      +FloatingFatMan
      126
  • Tell a friend

    Love Neowin? Tell a friend!