Answer the question
In order to leave comments, you need to log in
How to archive to the network with the creation of the necessary directory?
Hello.
The following command creates an archive by adding a date to the name.
tar -czvpf - /bla/bla/ | ssh [email protected] cat > /backups/bla_$(date +%Hh_%Mm_%d_%B_%Y).tar.gz
tar -czvpf - /bla/bla | ssh [email protected] cat > /backups/bla_$(date +%Hh_%Mm_%d_%B_%Y)/bla.tar.gz
Answer the question
In order to leave comments, you need to log in
What's stopping you from running the command?
DATE=$(date +%Hh_%Mm_%d_%B_%Y)
mkdir -p /backups/bla_${DATE}/
DATE=$(date +%Hh_%Mm_%d_%B_%Y);mkdir -p /backups/bla_${DATE}/;tar -czvpf - /bla/bla | ssh [email protected] cat > /backups/bla_${DATE}/bla.tar.gz
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question