Giter VIP home page Giter VIP logo

acts's People

Contributors

aghitza avatar alexjurkiewicz avatar arendtsen avatar assistcontrol avatar asymmetric avatar bannmann avatar cpcowart avatar jggimi avatar jjthrash avatar pascalj avatar pcfe avatar rosspf avatar shortchanged13 avatar sr avatar tomvanderlee avatar warrenguy avatar wraugh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

acts's Issues

Accept configuration path as argument

I’m packaging acts for the nix package manager, and it would help if the paths to the configuration file weren’t hardcoded.

Are you open to this change? If so, I could probably come up with a PR.

Prune only mode

Hi there again,
While fiddling with the other issue, I was thinking that acts could implement a "prune only" mode.

I faked it by setting $backuptargets to empty just in the Backup section (nicely organized btw) but it would be awesome to have a proper way to do that.

Again,
thank you for the script, it's really neat!

Acts exits without command line option

(I'm just starting to configure acts, so please forgive me if I'm confused).

When I run acts with no arguments, it fails with:
# acts
/usr/local/bin/acts: 1: parameter not set
Exit

I suspect this is due to the "set -u", followed quickly by: if [ "$1" ...
That is, $1 isn't set since I have no command line arguments, which triggers the shell to terminate the program.

# sh -x /usr/local/bin/acts
+ set -u
+ set -e
+ VERSION=1.2
/usr/local/bin/acts: 1: parameter not set
Exit 2

Running on FreeBSD 10.2.

Acts stuck on deletion

Hi there and thanks for this tool, I use it regularly and with great delight 😄

There is a problem I think on deletion I cannot really identify: every time there is a backup to prune it kind of gets stuck at this:

Debug: daily
Debug: message="More than 31 daily backups, deleting the oldest"
Info: message="Deleting backup prefix xyz-daily-2020-12-02_18:19:16-var*"
Debug: message="Deleting backup xyz-daily-2020-12-02_18:19:16-var"
<stuck here>

I tried to delete the backup with vanilla tarsnap and it did that in no time.

I wonder what that can be? Any hint on how to debug?

Can you add a license?

I know it's just a simple shell script, but still life would be simpler for some of us if you added a license...

cleaner archive names ?

It would be nice if the generated archive names did not have the noisy backslash inserted (currently done to prevent the initial hyphen breaking printf I guess).

Also, I'd like it if the timestamp were optional - I'd prefer to have just the date in the archive name.

Thanks for acts!

Question: is coreutils 8.21 really required?

I'm using the .deb to install to a production machine on a Ubuntu 12.04 machine. It requires coreutils 8.21, but 12.04 maxes out at 8.13. Do you think running with 8.13 will cause problems?

Copy daily backups rather than foregoing them

I haven’t actually deployed ACTS yet, so forgive me and close this out if I’m misinterpreting the code.

It looks like each backup will either be daily, monthly, or yearly. This means that the first two days of the year won’t have a daily backup.

Consider instead always doing a daily backup, and then copying to monthly/yearly as needed.
tarsnap -c -f monthlybackup @@dailybackup

The copy operation is pretty trivial in terms of data transfer, and that way there is always a daily, monthly, and yearly backup.

Directory's name containing spaces

Is it possible to backup a directory that contain a space in its name?

I tried escaping it like directory\ name but acts didn't like it.

acts-1.0
tarsnap 1.0.35
cygwin

Can't backup /

This may be a niche problem, and it's entirely likely that I'm misusing tarsnap, but I have carefully set nodump flags throughout my filesystem, and run tarsnap --nodump -c /.

Setting backuptargets="/" works, but leads to strange-looking archive names. ACTS essentially unsets $nicedirname, leading to a dangling hyphen (host-type-date-). Setting $backuptargets to . produces odd names too (host-type-date-.). More ideal would be to just leave $nicedirname off entirely in that case (host-type-date).

Consider then:

if [ "$dir" = "/" ]; then
    nicedirname=""
else
    nicedirname=$(echo "-$dir" | tr -d '/')

and s/-$nicedirname/$nicedirname/.

New feature: Use a different source directory instead of /

My use case involves backing up user data, and not the system itself. For example, I want to backup /pool/UserData1 and /pool/UserData2. Since these files are not in the root directory, and I don't want extraneous characters in my tarsnap archive names, I added a new variable "$backuproot", which tarsnaps relative to that instead of /.

> git diff acts
diff --git a/acts b/acts
index da1f966..0728751 100755
--- a/acts
+++ b/acts
@@ -137,13 +137,13 @@ fi
 # PART 3: Backup
 backuprc=0 # Notice any failed backups
 for dir in $backuptargets ; do
-    log_verbose "Backing up /$dir..."
+    log_verbose "Backing up $backuproot/$dir..."
     archive_starttime=$(date +%s)
     nicedirname=$(echo "$dir" | tr -d '/')
     # Uncontrolled expansion is bad, but we have little choice. See https://github.com/koalaman/shellcheck/wiki/Sc2086
     # shellcheck disable=SC2086
-    if ! output="$($tarsnap -c -f "$hostname-$archivetype-$today-$nicedirname" -C / $tarsnapbackupoptions "$dir" 2>&1)" ; then
-        log_message "Failed to back up \"$dir\"! ($output)"
+    if ! output="$($tarsnap -c -f "$hostname-$archivetype-$today-$nicedirname" -C $backuproot $tarsnapbackupoptions "$dir" 2>&1)" ; then
+        log_message "Failed to back up \"$backuproot/$dir\"! ($output)"
         backuprc=1
     fi
     archive_endtime=$(date +%s)

I don't actually know how to use git, so I hope this diff is sufficient if you want to include this for real. Note that acts.conf.sample should also be updated to include this variable. I have tested this for my one use case, but I probably messed things up, so please test first. :)

good reason for UTC (rather than local) timestamp?

I'm assuming having the archive names contain the timestamp relative to UTC time rather than local time was a design decision. I find the behavior slightly disorienting (my local time is 10 hours ahead of UTC, so typically even the date is off). Wouldn't local time be more generally useful?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.