Re: Backup question
Hi, On Wed, Mar 19, 2014 at 08:42:20AM +1100, Cameron Simpson wrote: On 16Mar2014 15:56, CS DBA cs_...@consistentstate.com wrote: where would I find a complete list of the completely dynamic top level directories? You shouldn't care that they're top level, only which ones are the right type. Like this: mount | awk '$5 ~ /^(xfs|ext2|ext3)$/ { print $1 }' So in a script: mountpoints=$( mount | awk '$5 ~ /^(xfs|ext2|ext3)$/ { print $1 }' ) for fs in $mount_points do ... backup $fs, eg rsync -x $fs ... done Expand the list of filesystem types with the ones you actually use; I tend to use xfs myself. You may want to explicitly avoid removable drives if they mount in a recognisably place. For example, I hand mount removable drives as /mnt/whatever, so I would avoid mount points starting with /mnt/ to keep them from polluting my backup system. I believe the recommended way to list filesystems (for many Fedoras) is to use findmnt. This should be easy to use: $ findmnt -l -o FSTYPE,TARGET | grep -E 'ext|ntfs|fat|xfs' Hope this helps, -- Suvayu Open source is the future. It sets us free. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Backup question
On 18Mar2014 22:58, Garry T. Williams gtwilli...@gmail.com wrote: On 3-19-14 08:42:20 Cameron Simpson wrote: mount | awk '$5 ~ /^(xfs|ext2|ext3)$/ { print $1 }' I think you meant `print $3'. Yes. Brain off. Sorry. -- Cameron Simpson c...@zip.com.au -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Backup question
On 16Mar2014 15:56, CS DBA cs_...@consistentstate.com wrote: where would I find a complete list of the completely dynamic top level directories? You shouldn't care that they're top level, only which ones are the right type. Like this: mount | awk '$5 ~ /^(xfs|ext2|ext3)$/ { print $1 }' So in a script: mountpoints=$( mount | awk '$5 ~ /^(xfs|ext2|ext3)$/ { print $1 }' ) for fs in $mount_points do ... backup $fs, eg rsync -x $fs ... done Expand the list of filesystem types with the ones you actually use; I tend to use xfs myself. You may want to explicitly avoid removable drives if they mount in a recognisably place. For example, I hand mount removable drives as /mnt/whatever, so I would avoid mount points starting with /mnt/ to keep them from polluting my backup system. Cheers, -- Cameron Simpson c...@zip.com.au C'est un Nagra. C'est suisse, et tres, tres precis.- _Diva_ -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Backup question
On 3-19-14 08:42:20 Cameron Simpson wrote: mount | awk '$5 ~ /^(xfs|ext2|ext3)$/ { print $1 }' I think you meant `print $3'. -- Garry T. Williams -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Backup question
On Sun, Mar 16, 2014 at 12:29:16PM -0600, CS DBA wrote: I have an rsync script to backup my entire system each time before I run updates, as versions come go I try and keep up with which top level directories to backup knowing that some like /proc are virtual... Here's my question: If I simply backup all directories (including ones like /proc /media, etc) will the following work, or do I need to care about specifically excluding the virtual directories? It might not _hurt_ to back up /proc, /sys, and the like, but it's a waste of time and effort since these are all entirely dynamically generated and you can't possibly restore them. You can use rsync -x to keep rsync from crossing filesystems, and then just do it separately for each real filesystem you want. Alternately, you might want to try the new Fedora Atomic -- http://rpm-ostree.cloud.fedoraproject.org/. As the name implies, this lets you do atomic updates and switch back if thereis aproblem. -- Matthew Miller-- Fedora Project--mat...@fedoraproject.org -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Backup question
On 16.03.2014, CS DBA wrote: Here's my question: If I simply backup all directories (including ones like /proc /media, etc) will the following work, or do I need to care about specifically excluding the virtual directories? I would run any backup/restore of the root filesystem only when booted from an external medium, to avoid problems with locks. What I do (and what would also work in your case) is: 1. Download sysresccd: http://www.sysresccd.org 2. Install the image on a memory stick: isohybrid sysresccd-image.iso cat sysresccd-image.iso /dev/sdX 3. Boot from it 4. Backup your partitions: rsync -avxHSAX /source/ /target To switch back to your system as it has been before a faulty update: rsync -avxHSAX --delete /target/ /source -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Backup question
On 3/16/14, 12:33 PM, Matthew Miller wrote: On Sun, Mar 16, 2014 at 12:29:16PM -0600, CS DBA wrote: I have an rsync script to backup my entire system each time before I run updates, as versions come go I try and keep up with which top level directories to backup knowing that some like /proc are virtual... Here's my question: If I simply backup all directories (including ones like /proc /media, etc) will the following work, or do I need to care about specifically excluding the virtual directories? It might not _hurt_ to back up /proc, /sys, and the like, but it's a waste of time and effort since these are all entirely dynamically generated and you can't possibly restore them. You can use rsync -x to keep rsync from crossing filesystems, and then just do it separately for each real filesystem you want. Alternately, you might want to try the new Fedora Atomic -- http://rpm-ostree.cloud.fedoraproject.org/. As the name implies, this lets you do atomic updates and switch back if thereis aproblem. Thanks, where would I find a complete list of the completely dynamic top level directories? -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Backup question
On Sun, Mar 16, 2014 at 03:56:18PM -0600, CS DBA wrote: where would I find a complete list of the completely dynamic top level directories? These days, there are quite a few special filesystems mounted on a running Linux system, but /proc and /sys are likely to be the only *top level* ones, plus /tmp may be on tmpfs. Type 'mount' and look at what you have on your system. -- Matthew Miller-- Fedora Project--mat...@fedoraproject.org -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org