APC Australia

Backup scripts

-

To run a server on TAILS, you need to save your software, web pages and client keys so they can be restored if necessary. These are saved in the encrypted ‘Persistent’ section of the USB stick.

Open Terminal in TAILS, then create a folder to store backups, with mkdir /home/amnesia/Persistent/ tails-server . Next run sudo nano /home/Amnesia/ Persistent/backup.sh and paste:

cp /etc/nginx/sitesavail­able/default /home/ amnesia/Persistent/tailsserve­r/

cp /etc/nginx/nginx.conf / home/amnesia/ Persistent/tails-server/ cp /etc/tor/torrc /home/ amnesia/Persistent/tailsserve­r/ cp /var/lib/tor/hidden_ service/hostname /home/ amnesia/Persistent/tailsserve­r/

cp /var/lib/tor/hidden_ service/private_ key /home/amnesia/Persistent/ tails-server/

cp /var/lib/tor/hidden_ service/client_ keys /home/amnesia/Persistent/ tails-server/

chmod -R 0777 /home/ amnesia/Persistent/ tails-server/ echo Done. Save and exit. Make it executable: sudo chmod a+x /home/ amnesia/Persistent/ backup.sh Run the backup: cd /home/amnesia/Persistent sudo ./backup.sh Press ‘Ctrl-X’, ‘Y’, then Enter to save and exit. Make the script executable with sudo chmod a+x /home/ amnesia/Persistent/backup.sh

Use cd /home/amnesia/ Persistent to switch to the Persistent directory, then run a backup with sudo ./backup.sh

To create the restore script, run the command sudo nano /home/ amnesia/Persistent/restore. sh , then paste in the following: apt-get update apt-get install -y nginxlight ufw ufw enable cp /home/amnesia/ Persistent/tails-server/torrc / etc/tor/torrc service tor restart service tor stop service nginx stop

cp /home/amnesia/ Persistent/tails-server/ default /etc/nginx/sitesavail­able/

cp -f /home/amnesia/ Persistent/tails-server/ hostname /var/lib/tor/ hidden_ service/

cp -f /home/amnesia/ Persistent/tails-server/ private_ key /var/lib/tor/ hidden_ service/

cp -f /home/amnesia/ Persistent/tails-server/ client_ keys /var/lib/tor/ hidden_ service/

cp /home/amnesia/ Persistent/tails-server/ nginx. conf /etc/nginx/nginx.conf chown -Rv www-data:www-data /var/www/ service tor start service nginx start echo Restored. Save and exit. Make the script executable with sudo chmod a+x /home/amnesia/Persistent/ restore.sh . To test, restart TAILS and run the restore script. Use cd / home/amnesia/Persistent to switch to the Persistent directory, then restore your server with

sudo ./restore.sh .

Newspapers in English

Newspapers from Australia