1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A way to resync backups with DropBox?

Discussion in 'Server Configuration and Hosting' started by Moshe1010, Sep 11, 2016.

  1. Moshe1010

    Moshe1010 Well-Known Member

    Is there a way like that? Generate a backup via a script on the server and sync it with a folder on DropBox, so I would have a local backup of my database + files on let's say a monthly basis?
  2. Dakis

    Dakis Well-Known Member

  3. Moshe1010

    Moshe1010 Well-Known Member

  4. Tracy Perry

    Tracy Perry Well-Known Member

    Generate the backups with a normal script (I'm going to assume you are on your own server).
    Then install the Linux Dropbox app and use it from the CLI via a script?

    You basically move the files into the DropBox directory and they should sync, or you can create symlinks (in the Dropbox directory) to them where they get created.

    As for a "monthly" basis, if you mean each month, then you will have to edit a script to move it over, but if it was me I'd simply keep 7 days worth (1 for each day of the week) of the files you have. There are plenty of scripts out there that you can get and modify that will do that for you.
    A simple one can be found at https://servinglinux.com/thread/4-backup-script/. In that one, if you are doing multiple DB's and directory backups then you'd want to have multiple copies of it (one for each DB/site) and then call them via a Cron job. You'd also want to modify the
    to have the file name prefixed with something like
    and replace the _db with _site if you do the actual site files separately. In fact, you can actually remove the $hostname from it if you want. I used it when I had multiple servers online and it allowed me to keep up with which went where.
    Last edited: Sep 12, 2016
    Moshe1010 likes this.
  5. Dakis

    Dakis Well-Known Member

    For wp check a plugin called UpDraft
    Moshe1010 likes this.

Share This Page