Backup home folder

Backup user home director to /tmp folder

0

Votes

!/bin/bash

This bash script is used to backup a user's home directory to /tmp/.

user=$(whoami) input=/home/$user output=/tmp/${user}home$(date +%Y-%m-%d_%H%M%S).tar.gz tar -czf $output $input echo "Backup of $input completed! Details about the output backup file:" ls -l $output

Vote Here

You must earn at least 1 vote on your snippets to be allowed to vote

Terms Of Use

Privacy Policy

Featured snippets are MIT license

Gears & Masters

Advertise

DevOpsnipp.com © 2020

medium.png