LinuxQuestions.org
Visit Jeremy's Blog.
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 11-19-2020, 09:01 AM   #1
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Rep: Reputation: Disabled
Lightbulb Backup to external disk


Hi there,

i have several questions

1.
if i want to move the whole backup content from /actualbackup folder to /oldandstable folder

have i to use
Code:
mv /run/media/myusername/ArchBackup/actualbackup/* /run/media/myusername/ArchBackup/oldandstable
?


2. if i want to do a backup on external drive and overwrite existing data, i do
Code:
sudo rsync -aAXHv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /run/media/myusername/ArchBackup/actualbackup
is that about right?


3.
i have read that theres a -delete variable for rsync which is "recommented" to add it to the backup command, when you backup frequently, why?

Thanks for reading and hopefuly even replying to my thread!
 
Old 11-19-2020, 10:19 AM   #2
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Arch4GoodieLike View Post
Code:
sudo rsync -aAXHv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /run/media/myusername/ArchBackup/actualbackup
Have you tried using that rsync command with a smaller set of data and piped the output to a log file to see if it's getting the files you want backed up and ignoring the files you don't want? I'd try that before unleashing it on the entire Linux filesystem. Personally, I'd find a way of omitting the browser caches, image thumbnails, and the other myriad of small files that browsing leaves under peoples' home directories.

Quote:
i have read that theres a -delete variable for rsync which is "recommented" to add it to the backup command, when you backup frequently, why?
The idea of the "--delete" switch is that files that exist on the rsync destination that no longer exist in the source are no longer needed so they should be deleted from the destination. Without that "--delete" switch, your rsync destination is your own, personal Wayback Machine. With it, you're making a snapshot-in-time of your current Linux filesystems. Only you know which solution you need. Check the description of "--delete" in the rsync(1) manpage; there are details about how it works that may affect your needs.

HTH...

Last edited by rnturn; 11-19-2020 at 10:21 AM.
 
Old 11-20-2020, 03:27 AM   #3
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rnturn View Post
Have you tried using that rsync command with a smaller set of data and piped the output to a log file to see if it's getting the files you want backed up and ignoring the files you don't want? I'd try that before unleashing it on the entire Linux filesystem. Personally, I'd find a way of omitting the browser caches, image thumbnails, and the other myriad of small files that browsing leaves under peoples' home directories.



The idea of the "--delete" switch is that files that exist on the rsync destination that no longer exist in the source are no longer needed so they should be deleted from the destination. Without that "--delete" switch, your rsync destination is your own, personal Wayback Machine. With it, you're making a snapshot-in-time of your current Linux filesystems. Only you know which solution you need. Check the description of "--delete" in the rsync(1) manpage; there are details about how it works that may affect your needs.

HTH...
Hey, thanks for replying!

Quote:
Originally Posted by rnturn View Post
Have you tried using that rsync command with a smaller set of data and piped the output to a log file to see if it's getting the files you want backed up and ignoring the files you don't want?
yes i have.


is this correct? (see below)


1.
if i want to move the whole backup content from /actualbackup folder to /oldandstable folder

have i to use
Code:
mv /run/media/myusername/ArchBackup/actualbackup/* /run/media/myusername/ArchBackup/oldandstable
?
 
  


Reply

Tags
backup, move



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
[SOLVED] how to take backup from hard disk to external hard disk? kri Linux - Newbie 4 09-28-2011 05:37 AM
can I backup a root disk and boot from the new backup disk linuxbkp Linux - Enterprise 3 10-15-2004 06:42 PM

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

All times are GMT -5. The time now is 05:59 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