LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2011, 11:39 AM   #1
LAPIII
Member
 
Registered: Mar 2009
Location: Virginia, US
Distribution: Ubuntu 10.10 & Debian 6.0.3,
Posts: 350

Rep: Reputation: 7
Help me backup a configuration file?


I've read:

It's always a good idea to backup a configuration file like sources.list before you edit it. To do so, issue the following command: sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup


Where does it backup to and how do I access it? I want to put the backup on removable disk or upload it
 
Old 02-11-2011, 11:47 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The format of the cp (copy) command is:

cp <source> <destination>

So in your example, you are copying the file '/etc/apt/sources.list' to the file '/etc/apt/sources.list.backup'.

Your backup is in '/etc/apt/sources.list.backup', which you can copy elsewhere if you like.
 
Old 02-11-2011, 11:50 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
cp /etc/apt/sources.list /etc/apt/sources.list.backup
It's backup to the
Code:
/etc/apt/
directory
To make a backup to a removable disk,
mount the disk and use
Code:
cp /etc/apt/sources.list /PATH/TO/THE/DISK/sources.list.backup
To upload the file, point your ftp to the
Code:
/etc/apt
directory, or where ever you stored the file

Kind regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPIO backup / configuration exactiv Linux - Software 3 05-25-2009 09:51 AM
Error when attempting backup with File Backup lglrgl Linux - Software 0 08-03-2006 10:38 AM
backup configuration file for webmin via command line? paul_mat Linux - Networking 1 02-05-2006 01:54 PM
Backup XFree86 configuration C.Loko Slackware 2 10-31-2003 04:05 AM
backup and update the backup file doris Linux - General 4 08-24-2002 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration