Skip to content

Instantly share code, notes, and snippets.

@vijayparikh
Forked from niraj-shah/s3cmd_sync.sh
Created April 24, 2020 19:27
Show Gist options
  • Select an option

  • Save vijayparikh/0c70faa0b11b68ed2db449b2c2c36f0c to your computer and use it in GitHub Desktop.

Select an option

Save vijayparikh/0c70faa0b11b68ed2db449b2c2c36f0c to your computer and use it in GitHub Desktop.

Revisions

  1. @niraj-shah niraj-shah revised this gist Mar 24, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions s3cmd_sync.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    # Command Line to run from terminal
    # Logs result to file s3_backup_load.log
    # Logs result to file s3_backup.log
    # Command will run in the background
    s3cmd sync -v /path/to/folder/ s3://s3-bucket/folder/ > s3_backup_load.log 2>&1 &
    s3cmd sync -v /path/to/folder/ s3://s3-bucket/folder/ > s3_backup.log 2>&1 &

    # Crontab command to sync folder to S3
    # Command will run 1am every day and logs result to /root/s3_backup_load.log
    0 1 * * * /usr/bin/s3cmd sync -rv /path/to/folder/ s3://s3-bucket/folder/ >> /root/s3_backup_load.log
    # Command will run 1am every day and logs result to /root/s3_backup.log
    0 1 * * * /usr/bin/s3cmd sync -rv /path/to/folder/ s3://s3-bucket/folder/ >> /root/s3_backup.log
  2. @niraj-shah niraj-shah revised this gist Mar 24, 2013. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions s3cmd_sync.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,8 @@
    # Command Line
    # Command Line to run from terminal
    # Logs result to file s3_backup_load.log
    # Command will run in the background
    s3cmd sync -v /path/to/folder/ s3://s3-bucket/folder/ > s3_backup_load.log 2>&1 &

    # Crontab
    # Crontab command to sync folder to S3
    # Command will run 1am every day and logs result to /root/s3_backup_load.log
    0 1 * * * /usr/bin/s3cmd sync -rv /path/to/folder/ s3://s3-bucket/folder/ >> /root/s3_backup_load.log
  3. @niraj-shah niraj-shah created this gist Mar 24, 2013.
    5 changes: 5 additions & 0 deletions s3cmd_sync.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # Command Line
    s3cmd sync -v /path/to/folder/ s3://s3-bucket/folder/ > s3_backup_load.log 2>&1 &

    # Crontab
    0 1 * * * /usr/bin/s3cmd sync -rv /path/to/folder/ s3://s3-bucket/folder/ >> /root/s3_backup_load.log