Backup file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Backup file
# 1  
Old 04-30-2012
Backup file

Im a fairly new linux user and im trying to learn how to do a backup shell script. i have this so far,

Code:
#! /bin/bash
backup_files="/home/clint/music"
dest="home/clint/backups'
day=$(date +%A)
hostname=$(hostname -s)
archive_file="$hostname-$day.tgz"
tar czf $dest/$archive_file $backup_files
echo "finished"

and im getting 2 errors:
Code:
line 8 expected eof while looking for matching `"'
line 9:syntax error: unexpected end of file

any help would be greatly appreciated

Last edited by Scott; 04-30-2012 at 04:48 PM.. Reason: Code tags
# 2  
Old 04-30-2012
Looks like your dest variable is wrong.Shouldn't it be like :

Code:
dest="/home/clint/backups'

This User Gave Thanks to nua7 For This Post:
# 3  
Old 04-30-2012
I managed to fix it, it was a problem with my quotations. Thanks for attempting to help Nua7, i really do appreciate it
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Chkpoint file... is it a UNIX backup file ?

Hello Helping a friend who had an accounting program called multisoft, hasn't used it for 4 years. I believe it was installed on a Unix box. He has a tax audit and needed to switch on the pc / server to access the data but the hard drive was beeping... totally dead. He said he had a... (3 Replies)
Discussion started by: BillSwan
3 Replies

2. Shell Programming and Scripting

Avoid overwriting backup file when multiple entries need to replace in one file input from another

Hello, I have been working on script in which search and replace the multiple pattern. 1. update_params.sh read the multiple pattern from input file ParamMapping.txt(old_entry|New_entry) and passing this values one by one to change_text.sh 2. change_text.sh read... (0 Replies)
Discussion started by: ketanraut
0 Replies

3. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies

4. Shell Programming and Scripting

rsync backup mode(--backup) Are there any options to remove backup folders on successful deployment?

Hi Everyone, we are running rsync with --backup mode, Are there any rsync options to remove backup folders on successful deployment? Thanks in adv. (0 Replies)
Discussion started by: MVEERA
0 Replies

5. UNIX for Advanced & Expert Users

backup a file and keep every version of the backup

I am trying to backup my .bash_history and I want to keep every version of the backup. I am thinking to put one of these in my crontab. 0 0 * * 0,3 cat .bash_history > boo 0 0 * * 0,3 cp .bash_history boo I would like the backups to be called boo1, boo2, boo3, etc. I would like to keep... (7 Replies)
Discussion started by: cokedude
7 Replies

6. Shell Programming and Scripting

File Backup - TAR help

Hi, Another rookie here. I have a script I am developing to backup files from various directories onto a windows machine. Script description: - mv files from various directories - tar all files in that directory - export to windows server for safe keeping, external backups. The... (5 Replies)
Discussion started by: mcclunyboy
5 Replies

7. Shell Programming and Scripting

rsync - update file on backup when file renamed on source

hi all, Please help me with rsync. I configured rsync to preserve timestamps using the -a option. When i renamed fileA to fileB on source machine I have to copies at the backup server. The aim is to keep the most recent file. fileA & fileB has same contents. When i renamed fileB to... (2 Replies)
Discussion started by: coolatt
2 Replies

8. SCO

Backup to SCSI Tape Backup aborts

I am trying to make a full backup of my system using the cpio command. The Tape Unit is a SCSI DDS. The process started fine but after about 30 minutes, it just stopped and showed the following message: 1755 Signal 31 - Core dumped Any idea of what is causing this and how to fix it? ... (4 Replies)
Discussion started by: zionpc
4 Replies

9. UNIX for Dummies Questions & Answers

Check backup file size on backup tape

Hi, I performed backup on tape and I want to append more files to my previous backup on the same backup tape. But before I do that I need to know the backup file size of the first backup I performed so that I know the available size on the backup tape. Can someone help me what command I will use... (0 Replies)
Discussion started by: ayhanne
0 Replies
Login or Register to Ask a Question