├── README.md └── nsync /README.md: -------------------------------------------------------------------------------- 1 | nsync 2 | ============= 3 | 4 | *You'll never have to say 'Bye Bye Bye' to your data.* 5 | 6 | nsync is an easy to use bash command-line tool to backup your files to NSA's fully secure and free backup servers. Here's some news coverage about NSA's free PRISM backup program: https://medium.com/surveillance-state/a6e0e5fca935 7 | 8 | How to backup data 9 | ------------- 10 | Backing up data is very simple. Just run `./nsync targetfolder` and your files will be automatically compressed and sent to NSA. Currently the backup endpoint is set to NSA's public affairs office. In reality the endpoint does not matter. Changing it to your mom's email address won't affect the backup process. 11 | 12 | How to restore your data 13 | ------------- 14 | NSA came up with a simple 3 step process to restore your backups. 15 | 16 | 1. Run for president of the United States 17 | 2. Get elected 18 | 3. Retrieve backup 19 | 20 | Known issues 21 | ------------- 22 | ##### I received an error message that my email size is exceeding the allowed limit 23 | Don't worry. Due to technical restrictions with legacy email systems this error might be raised when you send very large backups. You can safely ignore this message since your files got stored before they hit the actual mail server. 24 | 25 | License 26 | ------------- 27 | The MIT License (MIT) 28 | 29 | Copyright (c) 2013 Marian Zange 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in 39 | all copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 47 | THE SOFTWARE. 48 | -------------------------------------------------------------------------------- /nsync: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # If you want to use NSA's extended data retention feature, please specify your GPG key here. 4 | # GPG_KEY='nsa_backup_key' 5 | 6 | if [[ -z "$1" ]]; then 7 | echo "Please specify a file or folder to back up." 8 | exit 9 | else 10 | target="$1" 11 | fi 12 | 13 | tarfile="nsa-backup-$(date +%Y%m%d).tar.gz" 14 | filename="$tarfile" 15 | 16 | echo "Preparing files..." 17 | tar -cvzf "$tarfile" "$target" 18 | 19 | if [[ -n "$GPG_KEY" ]]; then 20 | echo "Processing for extended data retention..." 21 | filename="${tarfile}.gpg" 22 | gpg -e -r "$GPG_KEY" "$tarfile" && rm -f "$tarfile" 23 | fi 24 | 25 | echo "--------------------------------" 26 | echo "Sending backup to NSA's secure servers..." 27 | 28 | (uuencode "$filename" "$filename") | mail -s "NSYNC Backup" nsapao@nsa.gov 29 | 30 | echo "Thanks for using NSA backup services. Your secrets are safe with us." 31 | --------------------------------------------------------------------------------