Need small help. Basically script to zip folder to specific location with name "backup_%date%"
Save to folder: /extended/hdd2_1000/
Save this folder: /extended/hdd1_320/
Thanks :)
Need small help. Basically script to zip folder to specific location with name "backup_%date%"
Save to folder: /extended/hdd2_1000/
Save this folder: /extended/hdd1_320/
Thanks :)
Last edited by jM2.me; 02-08-10 at 06:35 PM.
jMerlin: I think by "script for linux" he means a bash script.
Here's one I wrote down quickly, nothing fancy but gets the job done.
Remember to change the variables so they fit to your setup, save it, chmod it and run it.Code:#!/bin/bash DIR_TO_TAR="/home/andreas/stuff" TARGET="/home/andreas/backups" TODAY=$(date +%d-%m-%y) FILENAME="backup_$TODAY.tar" cd $TARGET && tar -cvvf $FILENAME $DIR_TO_TAR
Or he could just use the tar command himself and RTFM (read the f'ing manpage).
;o
jMerlin no offense but you are being a weird nerd.
I am no linux but have to deal with it sometimes. All I asked for a script to pack folder with specific zip name with date.
I modified it and using it. Thanks to Mindblaster7
Opposite to you.
Thread closed...