D
D
Dee Key2015-12-25 16:21:02
Command line
Dee Key, 2015-12-25 16:21:02

Archiving folders made today?

good afternoon!
there is a script that makes backs every day, as a result, a folder with a date is obtained,
i.e. today, for example, the file name is back_dd_mm_yyy, tomorrow the back_dd_mm_yy folder with a new number is next to it.
you need to add a script to tar this folder, made on the current day with the same name as the folder or replacing the date name with the ip of this server where the backing is done

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abcd0x00, 2015-12-27
@abcd0x00

There you need to:
1. Compose the current date.
2. Select file names by current date.
3. Remove the date from the selected names, keeping the original names.
4. Compose the server address.
5. Add the server address to the received names.
6. For each old name, pack it in a container under a new name.
Ideally, each item should be isolated in a separate function that reads the input stream, changes it, and prints it to the output stream.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question