Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Backup with rclone

Discussion in 'Data Protection' started by screege, Jan 17, 2018.

  1. screege

    screege Well-Known Member

    Joined:
    Aug 11, 2004
    Messages:
    190
    Likes Received:
    0
    Trophy Points:
    166
    Has anybody tried to backup with rclone to onedrive? Onedrive now offers unlimited storage in the business plan, I am searching for a script that can pass the tar.gz daily to one drive.

    Regards
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,888
    Likes Received:
    90
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. screege

    screege Well-Known Member

    Joined:
    Aug 11, 2004
    Messages:
    190
    Likes Received:
    0
    Trophy Points:
    166
    As I stated I need to backup to onedrive, the aditional destinations of cpbackup does not support onedrive thats why I am asking if anyone has tried this with rclone and if there is a script that can be used.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,962
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,585
    Likes Received:
    439
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I don't see any way to login to OneDrive other than the Web Portal. How would you upload files if you have to use the website to do it?

    I've emailed OneDrive support to find out once and for all. :)

    You're not the first to ask about this on this forum. There's more to using OneDrive storage than just having unlimited storage plans. You need to be about to login and run a script, or connect via console or FTP or SFTP or something. AFAIK, you can't do any of those.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. tpotter

    tpotter Registered

    Joined:
    Feb 16, 2018
    Messages:
    2
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Huddersfield, United Kingdom
    cPanel Access Level:
    Root Administrator
    I use rclone to backup to onedrive and I've had it successfully working for the past week. If you set up rclone per their documentation, you add the following code to /var/spool/cron/root assuming that you ran the initial setup as root (I tried the built in cron in CPanel interface, but it didn't work, so I use this method). Per this thread, custom crons don't get overwritten by CPanel.


    45 2 * * * /usr/sbin/rclone sync /backup onedrive-backup:WHM

    That line of code assumes that your standard CPanel backup folder is /backup and you named your onedrive destination onedrive-backup when you setup rclone and you have a folder in onedrive called WHM to put backups into. I set it to run just after it sends the backup to a webdav NAS I have at around 2.45am. You need to make sure that if you use the sync command, that you retain a full set of backups on the server that you want mirroring in onedrive. If not, use copy instead of sync and files won't get deleted from your onedrive when they are removed from the server. This way you'd only need to keep one backup locally to copy across.

    If you need to move a specific backup to a different folder you can use this in a cron after they've been moved to onedrive and it will move today's backup file for the account you choose:

    rclone move onedrive-backup:WHM/$(date +%F)/accounts/accountname.tar.gz onedrive-backup:path-to-new-destination-in-onedrive

    If there's anything specific you need to know, I'd be happy to help.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice