- 
      
 - 
        
Save trdlo/6336196 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/sh | |
| # You might want to put this script in crontab, backup day by day. | |
| # | |
| # $ sudo -u git -H crontab -l | |
| # $ 0 0 1 * * /path/to/your/BackupGitlab.sh | |
| cd /home/git/gitlab | |
| /usr/local/bin/bundle exec rake gitlab:backup:create RAILS_ENV=production | |
| # Create a dropbox app https://www.dropbox.com/developers | |
| # Get an Uploader https://github.com/andreafabrizi/Dropbox-Uploader | |
| # Run this script first, it saved config to ~/.dropbox_uploader by default. | |
| # Upload last backup to Dropbox | |
| /path/to/your/dropbox_uploader.sh -f /path/to/your/.dropbox_uploader upload `find /home/git/gitlab/tmp/backups/ -type f -exec ls -1rt "{}" + | tail -n 1` | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment